1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Fix crash in UpgradeChart when upgrading fails

Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
Sebastian Malton 2022-06-17 11:30:33 -04:00
parent 87b8b241ff
commit bcd889999d

View File

@ -58,7 +58,11 @@ export class NonInjectedUpgradeChart extends React.Component<UpgradeChartProps &
),
reaction(
() => this.release?.getRevision(),
() => this.reloadValues(),
() => {
if (this.release) {
this.props.upgradeChartTabStore.reloadValues(this.props.tab.id);
}
},
{
fireImmediately: true,
},
@ -82,10 +86,6 @@ export class NonInjectedUpgradeChart extends React.Component<UpgradeChartProps &
return this.props.upgradeChartTabStore.values.getData(this.tabId);
}
async reloadValues() {
this.props.upgradeChartTabStore.reloadValues(this.props.tab.id);
}
async reloadVersions(release: HelmRelease | null | undefined) {
if (!release) {
return;