Skip to content
This repository has been archived by the owner on Feb 13, 2020. It is now read-only.

Commit

Permalink
selected version gets applied
Browse files Browse the repository at this point in the history
  • Loading branch information
debsmita1 committed Jun 21, 2019
1 parent fe9d602 commit 0d33b6e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion frontend/public/components/source-to-image.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ class BuildSource extends React.Component<BuildSourceProps, BuildSourceState> {
// Sort tags in reverse order by semver, falling back to a string comparison if not a valid version.
const tags = getBuilderTagsSortedByVersion(props.obj.data);
// Select the first tag if the current tag is missing or empty.
const selectedTag = previousTag && _.includes(tags, previousTag)
const selectedTag = previousTag && _.find(tags, {name:previousTag})
? previousTag
: _.get(_.head(tags), 'name');

Expand Down

0 comments on commit 0d33b6e

Please sign in to comment.