Skip to content

Commit

Permalink
Merge pull request #878 from replicatedhq/jelena-yaml-errors-checks
Browse files Browse the repository at this point in the history
Additional checks on yaml errors
  • Loading branch information
jgruica committed Jul 29, 2020
2 parents 323af55 + 9723bbc commit e239b12
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions kotsadm/web/src/components/apps/AppVersionHistory.jsx
Expand Up @@ -754,11 +754,11 @@ class AppVersionHistory extends Component {
}

yamlErrorsDetails = (downstream, version) => {
const pendingVersion = downstream.pendingVersions?.find(v => v.title === version.title);
const pastVersion = downstream.pastVersions?.find(v => v.title === version.title);
const pendingVersion = downstream?.pendingVersions?.find(v => v.sequence === version?.sequence);
const pastVersion = downstream?.pastVersions?.find(v => v.sequence === version?.sequence);

if (downstream.currentVersion?.title === version.title) {
return downstream.currentVersion?.yamlErrors ? downstream?.currentVersion?.yamlErrors : false;
if (downstream?.currentVersion?.sequence === version?.sequence) {
return downstream?.currentVersion?.yamlErrors ? downstream?.currentVersion?.yamlErrors : false;
} else if (pendingVersion?.yamlErrors) {
return pendingVersion?.yamlErrors;
} else if (pastVersion?.yamlErrors) {
Expand Down

0 comments on commit e239b12

Please sign in to comment.