mirror of
https://github.com/nasa/openmct.git
synced 2024-12-20 13:43:09 +00:00
[Creation] Tweak lazy initialization approach
This commit is contained in:
parent
c184a9ce7c
commit
cb432051dc
@ -48,8 +48,11 @@ define(
|
||||
* @returns {DomainObject} the new domain object
|
||||
*/
|
||||
InstantiationCapability.prototype.instantiate = function (model) {
|
||||
this.instantiate = this.$injector.get("instantiate");
|
||||
return this.instantiate(model);
|
||||
// Lazily initialize; instantiate depends on capabilityService,
|
||||
// which depends on all capabilities, including this one.
|
||||
this.instantiateFn = this.instantiateFn ||
|
||||
this.$injector.get("instantiate");
|
||||
return this.instantiateFn(model);
|
||||
};
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user