From 1c2378b3b4c6622fecdbccb9448f97fb449754d4 Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Thu, 14 Jul 2016 11:10:15 -0700 Subject: [PATCH] [Context] Suppress warnings while editing Don't expect consistency between composition and location fields while an object is being edited; this avoids benign warnings being logged. Fixes #624 --- platform/core/src/services/Contextualize.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/platform/core/src/services/Contextualize.js b/platform/core/src/services/Contextualize.js index ada5ed8bcc..9883c7af15 100644 --- a/platform/core/src/services/Contextualize.js +++ b/platform/core/src/services/Contextualize.js @@ -65,7 +65,13 @@ define( * which should appear as the contextual parent */ return function (domainObject, parentObject) { - validate(domainObject.getId(), parentObject); + // Don't validate while editing; consistency is not + // necessarily expected due to unsaved changes. + var editor = domainObject.getCapability('editor'); + if (editor && !editor.inEditContext()) { + validate(domainObject.getId(), parentObject); + } + return new ContextualDomainObject(domainObject, parentObject); }; }