mirror of
https://github.com/goharbor/harbor.git
synced 2024-12-22 16:48:30 +01:00
Refine expression.
This commit is contained in:
parent
a6f88aaac8
commit
26a2582553
@ -209,7 +209,7 @@ export class CreateEditDestinationComponent implements AfterViewChecked {
|
||||
for(let i in data) {
|
||||
let current = data[i];
|
||||
let origin = this.initVal[this.mappedName[i]];
|
||||
if(this.actionType === ActionType.EDIT && this.editable && !current || current && current !== origin) {
|
||||
if((this.actionType === ActionType.EDIT && this.editable && !current) || (current && current !== origin)) {
|
||||
this.hasChanged = true;
|
||||
break;
|
||||
} else {
|
||||
|
@ -293,7 +293,7 @@ export class CreateEditPolicyComponent implements OnInit, AfterViewChecked {
|
||||
for(let i in data) {
|
||||
let origin = this.initVal[i];
|
||||
let current = data[i];
|
||||
if(this.actionType === ActionType.EDIT && !this.readonly && !current || current && current !== origin) {
|
||||
if((this.actionType === ActionType.EDIT && !this.readonly && !current) || (current && current !== origin)) {
|
||||
this.hasChanged = true;
|
||||
break;
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user