Skip to content

Node 24 warns (node:80288) TimeoutNaNWarning: NaN is not a number. #1086

@yakobe

Description

@yakobe

After upgrading to node 24 i get the warning:

(node:80288) TimeoutNaNWarning: NaN is not a number.
Timeout duration was set to 1.
(Use `node --trace-warnings ...` to show where the warning was created)

It looks like this line is the problem:

return parseInt((delay && delay[type]) || delay || 0)

It looks like when delay[type] is 0 (eg {hide: 0}) then it is falsy and fals back to delay. Then it tries to parseInt({hide: 0}) itself which result in NaN.

Probably just return parseInt((delay && delay[type]) || delay) || 0 is enough to fix it so that it is definitely a number

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions