Skip to content

Commit

Permalink
utils: Reject and Error instead of a string
Browse files Browse the repository at this point in the history
  • Loading branch information
atinux committed Oct 18, 2017
1 parent 75a6430 commit c5834c5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ exports.waitForEvent = function (emmiter, eventName, timeout = -1) {
resolveCalled = true
}
emmiter.once(eventName, (...args) => r([...args]))
if (timeout >= 0) setTimeout(() => reject('Timeout'), timeout)
if (timeout >= 0) setTimeout(() => reject(new Error('Timeout')), timeout)
})
}

Expand Down

0 comments on commit c5834c5

Please sign in to comment.