@figliolia/galena 2.3.4 → 2.3.5
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.
|
@@ -208,11 +208,11 @@ class Galena extends Guards_1.Guards {
|
|
|
208
208
|
* subscriptions
|
|
209
209
|
*/
|
|
210
210
|
reIndexSubscriptions(name) {
|
|
211
|
-
var _a;
|
|
211
|
+
var _a, _b;
|
|
212
212
|
for (const [ID, unitSubscriptions] of this.subscriptions) {
|
|
213
213
|
const [stateName, listenerID] = unitSubscriptions[0];
|
|
214
214
|
const subscriptions = this.state[stateName]["emitter"].storage.get(stateName);
|
|
215
|
-
const listener = (_a = subscriptions === null || subscriptions === void 0 ? void 0 : subscriptions.storage) === null || _a === void 0 ? void 0 : _a.get(listenerID);
|
|
215
|
+
const listener = (_b = (_a = subscriptions === null || subscriptions === void 0 ? void 0 : subscriptions.storage) === null || _a === void 0 ? void 0 : _a.get) === null || _b === void 0 ? void 0 : _b.call(_a, listenerID);
|
|
216
216
|
if (listener) {
|
|
217
217
|
unitSubscriptions.push([name, this.state[name].subscribe(listener)]);
|
|
218
218
|
this.subscriptions.set(ID, unitSubscriptions);
|
|
@@ -208,7 +208,7 @@ export class Galena extends Guards {
|
|
|
208
208
|
for (const [ID, unitSubscriptions] of this.subscriptions) {
|
|
209
209
|
const [stateName, listenerID] = unitSubscriptions[0];
|
|
210
210
|
const subscriptions = this.state[stateName]["emitter"].storage.get(stateName);
|
|
211
|
-
const listener = subscriptions?.storage?.get(listenerID);
|
|
211
|
+
const listener = subscriptions?.storage?.get?.(listenerID);
|
|
212
212
|
if (listener) {
|
|
213
213
|
unitSubscriptions.push([name, this.state[name].subscribe(listener)]);
|
|
214
214
|
this.subscriptions.set(ID, unitSubscriptions);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@figliolia/galena",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.5",
|
|
4
4
|
"description": "A performant state management library supporting mutable state, batched updates, middleware and a rich development API",
|
|
5
5
|
"main": "dist/cjs/index.js",
|
|
6
6
|
"module": "dist/mjs/index.js",
|
package/src/Galena/Galena.ts
CHANGED
|
@@ -242,7 +242,7 @@ export class Galena<
|
|
|
242
242
|
const [stateName, listenerID] = unitSubscriptions[0];
|
|
243
243
|
const subscriptions =
|
|
244
244
|
this.state[stateName]["emitter"].storage.get(stateName);
|
|
245
|
-
const listener = subscriptions?.storage?.get(listenerID);
|
|
245
|
+
const listener = subscriptions?.storage?.get?.(listenerID);
|
|
246
246
|
if (listener) {
|
|
247
247
|
unitSubscriptions.push([name, this.state[name].subscribe(listener)]);
|
|
248
248
|
this.subscriptions.set(ID, unitSubscriptions);
|