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

don't setTimeout when eventListener callback is not set #1293

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

domakas
Copy link

@domakas domakas commented Oct 16, 2024

In node environment, when setting timeout with setTimeout(undefined, 0), it produces error TypeError [ERR_INVALID_ARG_TYPE]: The "callback" argument must be of type function. Received undefined. It seems like in this instance is always(?) undefined as _eventsListener which is passed always return undefined here:

const _eventsListener = (eventName, eventData, event) => {

This ussually happens in unit test. Seems like browser can handle this.

Maybe this setTimeout can be removed overall?

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.

1 participant