mirror of
https://github.com/goharbor/harbor.git
synced 2024-12-23 00:57:44 +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) {
|
for(let i in data) {
|
||||||
let current = data[i];
|
let current = data[i];
|
||||||
let origin = this.initVal[this.mappedName[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;
|
this.hasChanged = true;
|
||||||
break;
|
break;
|
||||||
} else {
|
} else {
|
||||||
|
@ -293,7 +293,7 @@ export class CreateEditPolicyComponent implements OnInit, AfterViewChecked {
|
|||||||
for(let i in data) {
|
for(let i in data) {
|
||||||
let origin = this.initVal[i];
|
let origin = this.initVal[i];
|
||||||
let current = data[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;
|
this.hasChanged = true;
|
||||||
break;
|
break;
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user