aboutsummaryrefslogtreecommitdiffstats
path: root/src/features/utils/FeatureStore.js
diff options
context:
space:
mode:
authorLibravatar Dominik Guzei <dominik.guzei@gmail.com>2019-04-16 13:36:02 +0200
committerLibravatar Dominik Guzei <dominik.guzei@gmail.com>2019-04-16 13:36:02 +0200
commit51a2a62e679131a2046b0d3f4a662448466ca86f (patch)
treefa75bbe50684cddce80459d6fc0b278e90005768 /src/features/utils/FeatureStore.js
parentMerge branch 'develop' of https://github.com/meetfranz/franz into develop (diff)
downloadferdium-app-51a2a62e679131a2046b0d3f4a662448466ca86f.tar.gz
ferdium-app-51a2a62e679131a2046b0d3f4a662448466ca86f.tar.zst
ferdium-app-51a2a62e679131a2046b0d3f4a662448466ca86f.zip
fix issues with actions and reactions setup in feature store
Diffstat (limited to 'src/features/utils/FeatureStore.js')
-rw-r--r--src/features/utils/FeatureStore.js10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/features/utils/FeatureStore.js b/src/features/utils/FeatureStore.js
index b6e0fbce3..0bc10e176 100644
--- a/src/features/utils/FeatureStore.js
+++ b/src/features/utils/FeatureStore.js
@@ -1,9 +1,7 @@
1import { union } from 'lodash';
2
3export class FeatureStore { 1export class FeatureStore {
4 _actions = null; 2 _actions = [];
5 3
6 _reactions = null; 4 _reactions = [];
7 5
8 stop() { 6 stop() {
9 this._stopActions(); 7 this._stopActions();
@@ -13,7 +11,7 @@ export class FeatureStore {
13 // ACTIONS 11 // ACTIONS
14 12
15 _registerActions(actions) { 13 _registerActions(actions) {
16 this._actions = union(this._actions, actions); 14 this._actions = actions;
17 this._startActions(); 15 this._startActions();
18 } 16 }
19 17
@@ -28,7 +26,7 @@ export class FeatureStore {
28 // REACTIONS 26 // REACTIONS
29 27
30 _registerReactions(reactions) { 28 _registerReactions(reactions) {
31 this._reactions = union(this._reactions, reactions); 29 this._reactions = reactions;
32 this._startReactions(); 30 this._startReactions();
33 } 31 }
34 32