Skip to content

Commit 4c79867

Browse files
committed
remove build files from git, fix for multiple throttle timeouts at once running
1 parent 9adcf9b commit 4c79867

File tree

4 files changed

+4
-21
lines changed

4 files changed

+4
-21
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
node_modules
2-
media
2+
media
3+
build

build/index.d.ts

Lines changed: 0 additions & 18 deletions
This file was deleted.

build/index.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

src/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,8 @@ function useViewportSizes(input) {
176176
if(throttleTimeout) {
177177
const lastTick = lastThrottledRef.current;
178178
const timeSinceLast = (!lastTick ? throttleTimeout : Date.now() - lastTick);
179-
console.log('should process in ->', throttleTimeout - timeSinceLast);
179+
180+
clearTimeout(throttleTimeoutRef);
180181

181182
throttleTimeoutRef.current = setTimeout(() => {
182183
lastThrottledRef.current = new Date().getTime();

0 commit comments

Comments
 (0)