Skip to content

Commit 2bea205

Browse files
fix(store): forFeature using instanceof instead of typeof (#2922)
Closes #2919
1 parent 775c794 commit 2bea205

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

modules/store/src/store_module.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -221,16 +221,16 @@ export class StoreModule {
221221
{
222222
provide: _FEATURE_CONFIGS,
223223
multi: true,
224-
useValue: typeof featureNameOrSlice === 'string' ? config : {},
224+
useValue: featureNameOrSlice instanceof Object ? {} : config,
225225
},
226226
{
227227
provide: STORE_FEATURES,
228228
multi: true,
229229
useValue: {
230230
key:
231-
typeof featureNameOrSlice === 'string'
232-
? featureNameOrSlice
233-
: featureNameOrSlice.name,
231+
featureNameOrSlice instanceof Object
232+
? featureNameOrSlice.name
233+
: featureNameOrSlice,
234234
reducerFactory:
235235
!(config instanceof InjectionToken) && config.reducerFactory
236236
? config.reducerFactory
@@ -254,9 +254,9 @@ export class StoreModule {
254254
provide: _FEATURE_REDUCERS,
255255
multi: true,
256256
useValue:
257-
typeof featureNameOrSlice === 'string'
258-
? reducersOrConfig
259-
: featureNameOrSlice.reducer,
257+
featureNameOrSlice instanceof Object
258+
? featureNameOrSlice.reducer
259+
: reducersOrConfig,
260260
},
261261
{
262262
provide: _FEATURE_REDUCERS_TOKEN,

0 commit comments

Comments
 (0)