Skip to content

Meta reducers ignored with forFeature #701

@dasch8

Description

@dasch8

I'm submitting a...


[ ] Regression (a behavior that used to work and stopped working in a new release)
[x] Bug report  
[ ] Feature request
[ ] Documentation issue or request

What is the current behavior?

When a single reducer (not a reducer map) for a feature module is added with forFeature, the supplied meta-reducers are ignored.

Expected behavior:

Meta-reducers should also be added when a single reducer is given instead of a reducer map.

Minimal reproduction of the problem with instructions:

  1. Add a single reducer and meta-reducer(s) for a feature:
StoreModule.forFeature('feature', fromFeature.reducer, {
    metaReducers: [fromFeature.metaReducer]
)

Plunker

Version of affected browser(s),operating system(s), npm, node and ngrx:

all

Other information:

The bug seems to be at

? (state: any, action: any) => reducers(state || initialState, action)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions