We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1b87cb6 commit 0f7f6f1Copy full SHA for 0f7f6f1
1 file changed
lib/internal/timers.js
@@ -173,6 +173,9 @@ class Timeout {
173
' a 32-bit signed integer.' +
174
'\nTimeout duration was set to 1.',
175
'TimeoutOverflowWarning');
176
+ } else if (after < 0) {
177
+ process.emitWarning(`${after} is a negative number.` +
178
+ '\nTimeout duration was set to 1.');
179
}
180
after = 1; // Schedule on next tick, follows browser behavior
181
0 commit comments