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

'immediate' Observale.interval failure #582

Closed
kwonoj opened this issue Oct 22, 2015 · 2 comments
Closed

'immediate' Observale.interval failure #582

kwonoj opened this issue Oct 22, 2015 · 2 comments

Comments

@kwonoj
Copy link
Member

kwonoj commented Oct 22, 2015

Snippet below (duplication is intended, single execution works fine)

Rx.Observable.interval(0).take(6).subscribe(console.log);
Rx.Observable.interval(0).take(6).subscribe(console.log);

leads into unexpected failure in nexttick scheduler like below.

\NextTickAction.js:39
                _this.scheduler.scheduled = false;
                                          ^
TypeError: Cannot set property 'scheduled' of undefined
    at Immediate._onImmediate (Z:\github\RxJS\dist\cjs\schedulers\NextTickAction.js:39:43)
    at processImmediate [as _immediateCallback] (timers.js:367:17)

Creating issue while try to triage root cause for this.

@trxcllnt
Copy link
Member

@kwonoj looks like it's caused by this check. We should move lines 43-46 from within the conditional to below it.

@kwonoj
Copy link
Member Author

kwonoj commented Oct 22, 2015

Thanks for tips. I'll try to create PR based on suggestion.

kwonoj added a commit to kwonoj/rxjs that referenced this issue Oct 23, 2015
- fix clearImmediate behavior prevents nextTickScheduler throws if it's
being used multiple time

closes ReactiveX#582
@lock lock bot locked as resolved and limited conversation to collaborators Jun 7, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants