diff --git a/platform/entanglement/src/services/LocatingObjectDecorator.js b/platform/entanglement/src/services/LocatingObjectDecorator.js index 1993c9cc94..6fde642ee0 100644 --- a/platform/entanglement/src/services/LocatingObjectDecorator.js +++ b/platform/entanglement/src/services/LocatingObjectDecorator.js @@ -69,9 +69,18 @@ define( } return objectService.getObjects([id]).then(function (objects) { - return exclude[id] ? - objects[id] : // Don't loop indefinitely. - attachContextForLocation(objects[id]); + if (exclude[id]) { + $log.warn([ + "LocatingObjectDecorator detected a cycle", + "while attempted to define a context for", + id + ";", + "no context will be added and unexpected behavior", + "may follow." + ].join(" ")); + return objects[id]; + } + + return attachContextForLocation(objects[id]); }); }