Merge pull request #815 from henrycjchen/master

fix time problem
This commit is contained in:
Angelos Chalaris
2018-10-09 14:14:33 +03:00
committed by GitHub

View File

@ -24,7 +24,7 @@ const throttle = (fn, wait) => {
fn.apply(context, args); fn.apply(context, args);
lastTime = Date.now(); lastTime = Date.now();
} }
}, wait - (Date.now() - lastTime)); }, Math.max(wait - (Date.now() - lastTime), 0));
} }
}; };
}; };