From 715f8907f719ea0fc96ebdaa3828bba06514a0b0 Mon Sep 17 00:00:00 2001 From: 30secondsofcode <30secondsofcode@gmail.com> Date: Tue, 9 Oct 2018 11:17:03 +0000 Subject: [PATCH] Travis build: 622 --- README.md | 2 +- docs/function.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c0e4315bb..b2751beb3 100644 --- a/README.md +++ b/README.md @@ -5099,7 +5099,7 @@ const throttle = (fn, wait) => { fn.apply(context, args); lastTime = Date.now(); } - }, wait - (Date.now() - lastTime)); + }, Math.max(wait - (Date.now() - lastTime), 0)); } }; }; diff --git a/docs/function.html b/docs/function.html index 80d666910..9d4d4c6a9 100644 --- a/docs/function.html +++ b/docs/function.html @@ -269,7 +269,7 @@ document.body.apply(context, args); lastTime = Date.now(); } - }, wait - (Date.now() - lastTime)); + }, Math.max(wait - (Date.now() - lastTime), 0)); } }; };