@splitsoftware/splitio-commons 1.12.1-rc.5 → 1.12.1-rc.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -85,7 +85,9 @@ function PluggableStorage(options) {
85
85
  return Promise.all(storageKeys.map(function (storageKey) { return wrapper.del(storageKey); }));
86
86
  }).then(function () { return wrapper.set(keys.buildHashKey(), currentHash); });
87
87
  }
88
- }).then(onReadyCb);
88
+ }).then(function () {
89
+ onReadyCb();
90
+ });
89
91
  }
90
92
  else {
91
93
  // Start periodic flush of async storages if not running synchronizer (producer mode)
@@ -82,7 +82,9 @@ export function PluggableStorage(options) {
82
82
  return Promise.all(storageKeys.map(function (storageKey) { return wrapper.del(storageKey); }));
83
83
  }).then(function () { return wrapper.set(keys.buildHashKey(), currentHash); });
84
84
  }
85
- }).then(onReadyCb);
85
+ }).then(function () {
86
+ onReadyCb();
87
+ });
86
88
  }
87
89
  else {
88
90
  // Start periodic flush of async storages if not running synchronizer (producer mode)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@splitsoftware/splitio-commons",
3
- "version": "1.12.1-rc.5",
3
+ "version": "1.12.1-rc.6",
4
4
  "description": "Split Javascript SDK common components",
5
5
  "main": "cjs/index.js",
6
6
  "module": "esm/index.js",
@@ -99,7 +99,9 @@ export function PluggableStorage(options: PluggableStorageOptions): IStorageAsyn
99
99
  return Promise.all(storageKeys.map(storageKey => wrapper.del(storageKey)));
100
100
  }).then(() => wrapper.set(keys.buildHashKey(), currentHash));
101
101
  }
102
- }).then(onReadyCb);
102
+ }).then(() => {
103
+ onReadyCb();
104
+ });
103
105
  } else {
104
106
  // Start periodic flush of async storages if not running synchronizer (producer mode)
105
107
  if (impressionCountsCache && (impressionCountsCache as ImpressionCountsCachePluggable).start) (impressionCountsCache as ImpressionCountsCachePluggable).start();