From 910671f798ad0d4fa903a366d8c3c8ad6a3f3340 Mon Sep 17 00:00:00 2001 From: Brandon Roberts Date: Wed, 9 Aug 2017 12:18:18 -0500 Subject: [PATCH] fix(Store): Use existing reducers when providing reducers without an InjectionToken Closes #250, related to #116 --- modules/store/src/store_module.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/modules/store/src/store_module.ts b/modules/store/src/store_module.ts index bcccb071bd..a8f98a34f7 100644 --- a/modules/store/src/store_module.ts +++ b/modules/store/src/store_module.ts @@ -107,9 +107,11 @@ export class StoreModule { deps: [_INITIAL_STATE], }, { provide: _INITIAL_REDUCERS, useValue: reducers }, - reducers instanceof InjectionToken - ? [{ provide: _STORE_REDUCERS, useExisting: reducers }] - : [], + { + provide: _STORE_REDUCERS, + useExisting: + reducers instanceof InjectionToken ? reducers : _INITIAL_REDUCERS, + }, { provide: INITIAL_REDUCERS, deps: [