Skip to content

store-devtools: cannot read property 'state' of undefined #624

@alex-okrushko

Description

@alex-okrushko

I'm submitting a...


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

What is the current behavior?

After syncing the latest ngrx into Google I have one of the tests failing (it's bootstrapping entire AppModule and has StoreDevtoolsModule.instrument({maxAge: 25}) as part of imports). The test fails to initialize, so none of the actual test code is executed yet.

The issue is surfaced in unliftState when computedStates has length of 2, yet currentStateIndex is 2 as well, and thus computedStates[currentStateIndex] returns undefiend.

screen shot 2017-12-02 at 8 59 06 pm

This is what was the state leading up to this call:

screen shot 2017-12-02 at 8 56 36 pm

Expected behavior:

Minimal reproduction of the problem with instructions:

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

Other information:

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions