From 5e079518920e012f0b9a35321c398d234de4b729 Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Wed, 2 Dec 2015 10:23:11 -0800 Subject: [PATCH] [Representation] Handle missing context Handle missing context when generating an ID path; this is missing in the root object. --- platform/representation/src/MCTRepresentation.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/platform/representation/src/MCTRepresentation.js b/platform/representation/src/MCTRepresentation.js index b68a6ad81e..98b97a841c 100644 --- a/platform/representation/src/MCTRepresentation.js +++ b/platform/representation/src/MCTRepresentation.js @@ -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();