mirror of
https://github.com/nasa/openmct.git
synced 2025-01-31 16:36:13 +00:00
[Representation] Handle missing context
Handle missing context when generating an ID path; this is missing in the root object.
This commit is contained in:
parent
2514e44083
commit
5e07951892
@ -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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user