minor refactoring
This commit is contained in:
parent
0b44abe121
commit
fb2c396917
@ -251,7 +251,7 @@ export class JsFuncComponent implements OnInit, OnChanges, OnDestroy, ControlVal
|
|||||||
ngOnChanges(changes: SimpleChanges): void {
|
ngOnChanges(changes: SimpleChanges): void {
|
||||||
for (const propName of Object.keys(changes)) {
|
for (const propName of Object.keys(changes)) {
|
||||||
const { firstChange, currentValue, previousValue } = changes[propName];
|
const { firstChange, currentValue, previousValue } = changes[propName];
|
||||||
const isChanged = isObject(currentValue) ? isEqual(currentValue, previousValue) : currentValue !== previousValue;
|
const isChanged = isObject(currentValue) ? !isEqual(currentValue, previousValue) : currentValue !== previousValue;
|
||||||
if (!firstChange && isChanged) {
|
if (!firstChange && isChanged) {
|
||||||
this.updateByChangesPropName(propName);
|
this.updateByChangesPropName(propName);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user