mirror of
https://github.com/nasa/openmct.git
synced 2025-06-19 15:43:48 +00:00
[Persistence] Fix method delegation
...used by PersistenceAggregator
This commit is contained in:
@ -64,11 +64,11 @@ define(
|
|||||||
|
|
||||||
Object.keys(METHOD_DEFAULTS).forEach(function (method) {
|
Object.keys(METHOD_DEFAULTS).forEach(function (method) {
|
||||||
PersistenceAggregator.prototype[method] = function (space) {
|
PersistenceAggregator.prototype[method] = function (space) {
|
||||||
var delegateArgs = arguments.slice(0);
|
var delegateArgs = Array.prototype.slice.apply(arguments, []);
|
||||||
return this.providerMapPromise.then(function (map) {
|
return this.providerMapPromise.then(function (map) {
|
||||||
var provider = map[space];
|
var provider = map[space];
|
||||||
return provider ?
|
return provider ?
|
||||||
provider.apply(provider, delegateArgs) :
|
provider[method].apply(provider, delegateArgs) :
|
||||||
METHOD_DEFAULTS[method];
|
METHOD_DEFAULTS[method];
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user