diff options
author | Dominik Guzei <dominik.guzei@gmail.com> | 2019-04-16 13:36:02 +0200 |
---|---|---|
committer | Dominik Guzei <dominik.guzei@gmail.com> | 2019-04-16 13:36:02 +0200 |
commit | 51a2a62e679131a2046b0d3f4a662448466ca86f (patch) | |
tree | fa75bbe50684cddce80459d6fc0b278e90005768 /src/features/utils/FeatureStore.js | |
parent | Merge branch 'develop' of https://github.com/meetfranz/franz into develop (diff) | |
download | ferdium-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.js | 10 |
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 @@ | |||
1 | import { union } from 'lodash'; | ||
2 | |||
3 | export class FeatureStore { | 1 | export 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 | ||