From 8b6a972fa459c1b78cddb725d829b365738b49c2 Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Mon, 6 Apr 2015 09:30:14 -0700 Subject: [PATCH] [Edit] Avoid double-wrapping Avoid double-wrapping editable domain objects, WTD-1071. --- .../commonUI/edit/src/objects/EditableDomainObjectCache.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/platform/commonUI/edit/src/objects/EditableDomainObjectCache.js b/platform/commonUI/edit/src/objects/EditableDomainObjectCache.js index 062d9fa15e..53faaa7ed5 100644 --- a/platform/commonUI/edit/src/objects/EditableDomainObjectCache.js +++ b/platform/commonUI/edit/src/objects/EditableDomainObjectCache.js @@ -51,6 +51,11 @@ define( // some special behavior for its context capability. root = root || domainObject; + // Avoid double-wrapping (WTD-1017) + if (domainObject.hasCapability('editor')) { + return domainObject; + } + // Provide an editable form of the object return new EditableDomainObject( domainObject,