[Representation] Handle missing context

Handle missing context when generating an ID path;
this is missing in the root object.
This commit is contained in:
Victor Woeltjen 2015-12-02 10:23:11 -08:00
parent 2514e44083
commit 5e07951892

View File

@ -157,6 +157,9 @@ define(
if (!domainObject) {
return [];
}
if (!domainObject.hasCapability('context')) {
return [domainObject.getId()];
}
return domainObject.getCapability('context')
.getPath().map(function (pathObject) {
return pathObject.getId();