mirror of
https://github.com/nasa/openmct.git
synced 2025-06-12 20:28:14 +00:00
[Containment] Fix bundle
Fix dependencies in containment bundle to allow loading, WTD-962.
This commit is contained in:
@ -8,10 +8,17 @@ define(
|
||||
/**
|
||||
* Defines composition policy as driven by type metadata.
|
||||
*/
|
||||
function CompositionPolicy(typeService, capabilityService) {
|
||||
function CompositionPolicy($injector) {
|
||||
// We're really just wrapping the containment table and rephrasing
|
||||
// it as a policy decision.
|
||||
var table = new ContainmentTable(typeService, capabilityService);
|
||||
var table;
|
||||
|
||||
function getTable() {
|
||||
return (table = table || new ContainmentTable(
|
||||
$injector.get('typeService'),
|
||||
$injector.get('capabilityService')
|
||||
));
|
||||
}
|
||||
|
||||
return {
|
||||
/**
|
||||
@ -19,7 +26,7 @@ define(
|
||||
* contain the type described by the context?
|
||||
*/
|
||||
allow: function (candidate, context) {
|
||||
return table.canContain(candidate, context);
|
||||
return getTable().canContain(candidate, context);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user