Skip to content

Commit 2b04ba1

Browse files
committed
Ensure integer argument to setTimeout.
Related to nodejs/node-v0.x-archive#8073 Reported in nodeschool/discussions#486
1 parent 8ecfd44 commit 2b04ba1

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "functional-javascript-workshop",
3-
"version": "0.0.25",
3+
"version": "0.0.26",
44
"description": "The basics of functional programming in JavaScript. No libraries required.",
55
"main": "index.js",
66
"bin": {

problems/async_loops/setup.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ module.exports = input(new Array(randomInt(10, 20))
2727
var match = users.filter(function(user) {return user.id === id})
2828
if (match.length) fn(match[0])
2929
else fn(null)
30-
}, Math.random() * 1000)
30+
}, Math.floor(Math.random() * 1000))
3131
}
3232
var done = function(submittedUsers) {
3333
clearTimeout(tooLong)

0 commit comments

Comments
 (0)