aboutsummaryrefslogtreecommitdiffstats
path: root/app/scripts/lib/ComposableObservableStore.js
diff options
context:
space:
mode:
Diffstat (limited to 'app/scripts/lib/ComposableObservableStore.js')
-rw-r--r--app/scripts/lib/ComposableObservableStore.js22
1 files changed, 11 insertions, 11 deletions
diff --git a/app/scripts/lib/ComposableObservableStore.js b/app/scripts/lib/ComposableObservableStore.js
index 688594b6d..d5ee708a1 100644
--- a/app/scripts/lib/ComposableObservableStore.js
+++ b/app/scripts/lib/ComposableObservableStore.js
@@ -11,24 +11,24 @@ class ComposableObservableStore extends ObservableStore {
* @param {Object} [initState] - The initial store state
* @param {Object} [config] - Map of internal state keys to child stores
*/
- constructor (initState, config) {
- super()
- this.updateStructure(config)
- }
+ constructor (initState, config) {
+ super(initState)
+ this.updateStructure(config)
+ }
/**
* Composes a new internal store subscription structure
*
* @param {Object} [config] - Map of internal state keys to child stores
*/
- updateStructure (config) {
+ updateStructure (config) {
this.config = config
- this.removeAllListeners()
- for (const key in config) {
- config[key].subscribe((state) => {
- this.updateState({ [key]: state })
- })
- }
+ this.removeAllListeners()
+ for (const key in config) {
+ config[key].subscribe((state) => {
+ this.updateState({ [key]: state })
+ })
+ }
}
/**