Skip to content

Commit

Permalink
Ensure integer argument to setTimeout.
Browse files Browse the repository at this point in the history
  • Loading branch information
timoxley committed Aug 19, 2014
1 parent 8ecfd44 commit 2b04ba1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "functional-javascript-workshop",
"version": "0.0.25",
"version": "0.0.26",
"description": "The basics of functional programming in JavaScript. No libraries required.",
"main": "index.js",
"bin": {
Expand Down
2 changes: 1 addition & 1 deletion problems/async_loops/setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ module.exports = input(new Array(randomInt(10, 20))
var match = users.filter(function(user) {return user.id === id})
if (match.length) fn(match[0])
else fn(null)
}, Math.random() * 1000)
}, Math.floor(Math.random() * 1000))
}
var done = function(submittedUsers) {
clearTimeout(tooLong)
Expand Down

0 comments on commit 2b04ba1

Please sign in to comment.