Commit 07f22788 authored by Tristan Cavelier's avatar Tristan Cavelier

replace !isNaN() by isFinite()

parent cdad6cd7
......@@ -291,7 +291,7 @@ Promise.first = function (items) { // *promises
Promise.delay = function (timeout, every) {
var next = new Promise(), solver, ident, now = 0;
solver = next.defer();
if (typeof every === 'number' && !isNaN(every)) {
if (typeof every === 'number' && isFinite(every)) {
ident = setInterval(function () {
now += every;
solver.notify(now);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment