mirror of
https://github.com/nasa/openmct.git
synced 2025-03-10 14:34:08 +00:00
[Edit] Avoid double-wrapping
Avoid double-wrapping editable domain objects, WTD-1071.
This commit is contained in:
parent
60ed17e32b
commit
8b6a972fa4
@ -51,6 +51,11 @@ define(
|
|||||||
// some special behavior for its context capability.
|
// some special behavior for its context capability.
|
||||||
root = root || domainObject;
|
root = root || domainObject;
|
||||||
|
|
||||||
|
// Avoid double-wrapping (WTD-1017)
|
||||||
|
if (domainObject.hasCapability('editor')) {
|
||||||
|
return domainObject;
|
||||||
|
}
|
||||||
|
|
||||||
// Provide an editable form of the object
|
// Provide an editable form of the object
|
||||||
return new EditableDomainObject(
|
return new EditableDomainObject(
|
||||||
domainObject,
|
domainObject,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user