[Representation] Fix unchanged check

Fix logic in unchanged check; compare booleans to detect if
they have changed, instead of just anding them. Partially
addresses 
This commit is contained in:
Victor Woeltjen 2016-03-10 13:48:53 -08:00
parent ff5f37dfbe
commit 5d084c2618

View File

@ -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) {