Skip to content

Commit 772c8ff

Browse files
committed
correctly use 0 as fallback value, later node versions were issuing a warning here
1 parent c2db67a commit 772c8ff

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎index.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ app.all('/{*splat}', (req, res) => {
176176
}
177177

178178
//Delay the response for a user defined time
179-
const sleepTime = parseInt(req.headers["x-set-response-delay-ms"] || req.query["x-set-response-delay-ms"], 0)
179+
const sleepTime = parseInt(req.headers["x-set-response-delay-ms"] || req.query["x-set-response-delay-ms"]) || 0;
180180
sleep(sleepTime).then(() => {
181181

182182
//Set the response content type to what the user wants

0 commit comments

Comments
 (0)