[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:
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) { 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) {