-
Notifications
You must be signed in to change notification settings - Fork 29.7k
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
Override the next method of an asynchronous iterator doesn't work in v10 #21125
Comments
I realized that Chrome and Firefox have the same behaviour of Node 10. Does that mean that the wrong behaviour happens on Node 8? (behind |
Any features like that that are only available behind a flag should be considered experimental. My guess is that what you're experiencing now is the expected behavior. |
I'm affraid that's the case, which makes me extremely disappointed since method overriding is something that should be possible in this case. The only way to achieve the same result that I can think of is managing state with a control variable. |
See this StackOverflow question - it doesn't look to be a bug in Node. The same behavior is visible in native browser-based JS as well. |
Answered, closing. Next time, please post to nodejs/help if you're not sure it's a bug in Node.js. |
Bug Report
Current Behavior
Override the next method of an asynchronous iterator object doesn't work in v10.
Input Code
Expected behavior/code
The output should be
outter
printed, followed by multipleinner
, but in fact, the looping always printsoutter
and theninner
, repeatedly.Expected:
Reality:
Environment
The text was updated successfully, but these errors were encountered: