[Representation] Handle missing context
Handle missing context when generating an ID path; this is missing in the root object.
This commit is contained in:
@@ -157,6 +157,9 @@ define(
|
|||||||
if (!domainObject) {
|
if (!domainObject) {
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
if (!domainObject.hasCapability('context')) {
|
||||||
|
return [domainObject.getId()];
|
||||||
|
}
|
||||||
return domainObject.getCapability('context')
|
return domainObject.getCapability('context')
|
||||||
.getPath().map(function (pathObject) {
|
.getPath().map(function (pathObject) {
|
||||||
return pathObject.getId();
|
return pathObject.getId();
|
||||||
|
|||||||
Reference in New Issue
Block a user