Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix recursive app tick #443

Merged
merged 1 commit into from
Jul 14, 2017

Conversation

e-schultz
Copy link
Member

the app explodes if devTools are disabled because "ApplicationRef._tick called recursively"
and NgRedux dispatch is in the stack, as well as two NgZone.run calls

basically it's

  • ApplicationRef._tick -> ngOnInit -> subscribe -> bunch of rxjs internals -> ngRedux.dispatch -> ngZone.run -> ApplicationRef._tick

fix: check if in ngZone and only do this.ngZone.run( .... ) if not

the app explodes if devTools are disabled because "ApplicationRef._tick called recursively"
and NgRedux dispatch is in the stack, as well as two NgZone.run calls

basically it's

* ApplicationRef._tick -> ngOnInit -> subscribe -> bunch of rxjs internals -> ngRedux.dispatch -> ngZone.run -> ApplicationRef._tick

fix: check if in ngZone and only do `this.ngZone.run( .... )` if not
.map(resolveToFunctionSelector(selector))
.distinctUntilChanged(comparator);
this._store$
.distinctUntilChanged()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

was this whitespace change intentional?

@SethDavenport
Copy link
Member

Looks good. :shipit:

@SethDavenport
Copy link
Member

We can release a patch version for this.

@SethDavenport SethDavenport reopened this Jul 12, 2017
@e-schultz e-schultz merged commit 2bfc385 into angular-redux:master Jul 14, 2017
@SethDavenport
Copy link
Member

Thanks @e-schultz - can you date the changelog too?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants