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

setImmediate polyfill is not implementing node 16 standard of setImmediate #1474

Closed
filipomar opened this issue Apr 25, 2022 · 2 comments · Fixed by #1626
Closed

setImmediate polyfill is not implementing node 16 standard of setImmediate #1474

filipomar opened this issue Apr 25, 2022 · 2 comments · Fixed by #1626
Labels

Comments

@filipomar
Copy link

filipomar commented Apr 25, 2022

While working with the MQTT client on the browser, I noticed callbacks (sent through setImmediate) are missing parameters.

I tracked the problem down to this snippet:

const setImmediate = global.setImmediate || function (callback) {
  // works in node v0.8
  nextTick(callback)
}

Here is the problematic function mentioned above.

It does not implement the setImmediate as per the documentation here with the callback args.

But using core-js's polyfill is for now a good enough alternative (need to be imported before the mqtt lib):

import 'core-js/modules/web.immediate'
@filipomar
Copy link
Author

PR submitted

@github-actions
Copy link

github-actions bot commented Jul 2, 2023

This is an automated message to let you know that this issue has
gone 365 days without any activity. In order to ensure that we work
on issues that still matter, this issue will be closed in 14 days.

If this issue is still important, you can simply comment with a
"bump" to keep it open.

Thank you for your contribution.

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

Successfully merging a pull request may close this issue.

1 participant