mirror of
https://github.com/nasa/openmct.git
synced 2025-06-13 04:38:15 +00:00
Merge pull request #758 from nasa/error-message-753
[Tree] Don't assume context capability is present
This commit is contained in:
@ -105,13 +105,13 @@ define([
|
||||
};
|
||||
|
||||
function getIdPath(domainObject) {
|
||||
var context = domainObject && domainObject.getCapability('context');
|
||||
|
||||
function getId(domainObject) {
|
||||
return domainObject.getId();
|
||||
}
|
||||
|
||||
return domainObject ?
|
||||
domainObject.getCapability('context').getPath().map(getId) :
|
||||
[];
|
||||
return context ? context.getPath().map(getId) : [];
|
||||
}
|
||||
|
||||
TreeNodeView.prototype.value = function (domainObject) {
|
||||
|
Reference in New Issue
Block a user