mirror of
https://github.com/nasa/openmct.git
synced 2025-06-16 06:08:11 +00:00
[Add] Remove obsolete variable reference
The cache has been externalized to allow writing to it upon domain object instantiation.
This commit is contained in:
@ -59,7 +59,7 @@ define(
|
|||||||
// We update in-place to ensure there is only ever one instance
|
// We update in-place to ensure there is only ever one instance
|
||||||
// of any given model exposed by the modelService as a whole.
|
// of any given model exposed by the modelService as a whole.
|
||||||
function updateModel(id, model) {
|
function updateModel(id, model) {
|
||||||
var oldModel = cache[id];
|
var oldModel = cacheService.get(id);
|
||||||
|
|
||||||
// Same object instance is a possibility, so don't copy
|
// Same object instance is a possibility, so don't copy
|
||||||
if (oldModel === model) {
|
if (oldModel === model) {
|
||||||
@ -108,7 +108,7 @@ define(
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Otherwise, just expose the cache directly
|
// Otherwise, just expose the cache directly
|
||||||
return fastPromise(cache);
|
return fastPromise(cacheService.all());
|
||||||
};
|
};
|
||||||
|
|
||||||
return CachingModelDecorator;
|
return CachingModelDecorator;
|
||||||
|
Reference in New Issue
Block a user