+4
-1
@@ -353,2 +353,5 @@ import { EventEmitter } from 'eventemitter3'; | ||
| }; | ||
| if (options.timeout !== undefined && !(Number.isFinite(options.timeout) && options.timeout > 0)) { | ||
| throw new TypeError(`Expected \`timeout\` to be a positive finite number, got \`${options.timeout}\` (${typeof options.timeout})`); | ||
| } | ||
| return new Promise((resolve, reject) => { | ||
@@ -384,3 +387,3 @@ // Create a unique symbol for tracking this task | ||
| let operation = function_({ signal: options.signal }); | ||
| if (options.timeout) { | ||
| if (options.timeout !== undefined) { | ||
| operation = pTimeout(Promise.resolve(operation), { | ||
@@ -387,0 +390,0 @@ milliseconds: options.timeout, |
+1
-1
| { | ||
| "name": "p-queue", | ||
| "version": "9.3.1", | ||
| "version": "9.3.2", | ||
| "description": "Promise queue with concurrency control", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
83961
0.33%1240
0.24%