From 5d084c26184cc3a5b030f7a83137c9ee7dc12450 Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Thu, 10 Mar 2016 13:48:53 -0800 Subject: [PATCH] [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 --- platform/representation/src/MCTRepresentation.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/platform/representation/src/MCTRepresentation.js b/platform/representation/src/MCTRepresentation.js index 588676cf9a..54b0743e0c 100644 --- a/platform/representation/src/MCTRepresentation.js +++ b/platform/representation/src/MCTRepresentation.js @@ -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) {