mirror of
https://github.com/nasa/openmct.git
synced 2025-01-14 00:40:06 +00:00
[Representation] Fix unchanged check
Fix logic in unchanged check; compare booleans to detect if they have changed, instead of just anding them. Partially addresses #732
This commit is contained in:
parent
ff5f37dfbe
commit
5d084c2618
@ -140,15 +140,13 @@ define(
|
|||||||
}
|
}
|
||||||
|
|
||||||
function unchanged(canRepresent, canEdit, idPath, key) {
|
function unchanged(canRepresent, canEdit, idPath, key) {
|
||||||
return canRepresent &&
|
return (canRepresent === couldRepresent) &&
|
||||||
couldRepresent &&
|
(key === lastKey) &&
|
||||||
key === lastKey &&
|
(idPath.length === lastIdPath.length) &&
|
||||||
idPath.length === lastIdPath.length &&
|
|
||||||
idPath.every(function (id, i) {
|
idPath.every(function (id, i) {
|
||||||
return id === lastIdPath[i];
|
return id === lastIdPath[i];
|
||||||
}) &&
|
}) &&
|
||||||
canEdit &&
|
(canEdit === couldEdit);
|
||||||
couldEdit;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function getIdPath(domainObject) {
|
function getIdPath(domainObject) {
|
||||||
|
Loading…
Reference in New Issue
Block a user