[Edit] Avoid double-wrapping

Avoid double-wrapping editable domain objects, WTD-1071.
This commit is contained in:
Victor Woeltjen 2015-04-06 09:30:14 -07:00
parent 60ed17e32b
commit 8b6a972fa4

View File

@ -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,