mirror of
https://github.com/nasa/openmct.git
synced 2025-05-08 03:28:33 +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
|
* @returns {DomainObject} the new domain object
|
||||||
*/
|
*/
|
||||||
InstantiationCapability.prototype.instantiate = function (model) {
|
InstantiationCapability.prototype.instantiate = function (model) {
|
||||||
this.instantiate = this.$injector.get("instantiate");
|
// Lazily initialize; instantiate depends on capabilityService,
|
||||||
return this.instantiate(model);
|
// which depends on all capabilities, including this one.
|
||||||
|
this.instantiateFn = this.instantiateFn ||
|
||||||
|
this.$injector.get("instantiate");
|
||||||
|
return this.instantiateFn(model);
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user