mirror of
https://github.com/nasa/openmct.git
synced 2024-12-26 00:01:05 +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) {
|
||||
return canRepresent &&
|
||||
couldRepresent &&
|
||||
key === lastKey &&
|
||||
idPath.length === lastIdPath.length &&
|
||||
return (canRepresent === couldRepresent) &&
|
||||
(key === lastKey) &&
|
||||
(idPath.length === lastIdPath.length) &&
|
||||
idPath.every(function (id, i) {
|
||||
return id === lastIdPath[i];
|
||||
}) &&
|
||||
canEdit &&
|
||||
couldEdit;
|
||||
(canEdit === couldEdit);
|
||||
}
|
||||
|
||||
function getIdPath(domainObject) {
|
||||
|
Loading…
Reference in New Issue
Block a user