mirror of
https://github.com/nasa/openmct.git
synced 2024-12-20 13:43:09 +00:00
parent
d1c0d81120
commit
88b8528aaf
@ -69,9 +69,18 @@ define(
|
|||||||
}
|
}
|
||||||
|
|
||||||
return objectService.getObjects([id]).then(function (objects) {
|
return objectService.getObjects([id]).then(function (objects) {
|
||||||
return exclude[id] ?
|
if (exclude[id]) {
|
||||||
objects[id] : // Don't loop indefinitely.
|
$log.warn([
|
||||||
attachContextForLocation(objects[id]);
|
"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]);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user