Skip to content

Commit

Permalink
Check repo state instead of props when upgrading (#1469)
Browse files Browse the repository at this point in the history
  • Loading branch information
Andres Martinez Gotor authored Jan 20, 2020
1 parent 7a21c29 commit f4869fa
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion dashboard/src/components/AppUpgrade/AppUpgrade.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ class AppUpgrade extends React.Component<IAppUpgradeProps, IAppUpgradeState> {

public componentDidUpdate(prevProps: IAppUpgradeProps) {
const { repos, app } = this.props;
const prevRepo = this.state.repo;
let repo = this.state.repo;
// Retrieve the current repo
if (!repo) {
Expand Down Expand Up @@ -93,7 +94,7 @@ class AppUpgrade extends React.Component<IAppUpgradeProps, IAppUpgradeState> {
repo &&
repo.metadata &&
repo.metadata.name &&
(prevProps.app !== app || prevProps.repo !== repo)
(prevProps.app !== app || prevRepo !== repo)
) {
const chartID = `${repo.metadata.name}/${chart.metadata.name}`;
this.props.getDeployedChartVersion(chartID, chart.metadata.version);
Expand Down

0 comments on commit f4869fa

Please sign in to comment.