From 730361e0b7938838fb55d1b08aa0c21ca008870b Mon Sep 17 00:00:00 2001 From: Gabriel Schuster Date: Wed, 7 Mar 2018 15:18:49 +0100 Subject: [PATCH] feat(Store): Added feature name to Update Reducers action --- modules/store/src/reducer_manager.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/store/src/reducer_manager.ts b/modules/store/src/reducer_manager.ts index 95fce084e0..bbbcf4441e 100644 --- a/modules/store/src/reducer_manager.ts +++ b/modules/store/src/reducer_manager.ts @@ -61,18 +61,18 @@ export class ReducerManager extends BehaviorSubject> addReducer(key: string, reducer: ActionReducer) { this.reducers = { ...this.reducers, [key]: reducer }; - this.updateReducers(); + this.updateReducers(key); } removeReducer(key: string) { this.reducers = omit(this.reducers, key) /*TODO(#823)*/ as any; - this.updateReducers(); + this.updateReducers(key); } - private updateReducers() { + private updateReducers(key: string) { this.next(this.reducerFactory(this.reducers, this.initialState)); - this.dispatcher.next({ type: UPDATE }); + this.dispatcher.next({ type: UPDATE, feature: key }); } ngOnDestroy() {