Skip to content

Commit

Permalink
fix(docker): make tag optional, do not set to null if undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
anotherchrisberry committed Apr 14, 2017
1 parent 189ad50 commit 4edeca6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,7 @@
class="form-control input-sm"
ng-model="$ctrl.tag"
ng-disabled="$ctrl.viewState.imagesRefreshing || !$ctrl.repository"
ng-change="$ctrl.updateTag()"
required/>
ng-change="$ctrl.updateTag()"/>
</div>
</div>
<div class="form-group" ng-if="!$ctrl.specifyTagByRegex">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,14 +84,14 @@ export class DockerImageAndTagSelectorController implements ng.IComponentControl

private updateTag(): void {
if (this.specifyTagByRegex) {
if (trim(this.tag) === '') {
if (trim(this.tag) === '' && this.tag) {
this.tag = null;
}
} else {
if (this.repositoryMap) {
const key = this.repository;
this.tags = this.repositoryMap[key] || [];
if (!this.tags.includes(this.tag)) {
if (!this.tags.includes(this.tag) && this.tag) {
this.tag = null;
}
}
Expand Down

0 comments on commit 4edeca6

Please sign in to comment.