Merge pull request #758 from nasa/error-message-753

[Tree] Don't assume context capability is present
This commit is contained in:
Andrew Henry
2016-03-16 15:33:59 -07:00
2 changed files with 18 additions and 3 deletions

View File

@ -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) {