Skip to content
This repository was archived by the owner on Aug 23, 2022. It is now read-only.

Commit 17243ed

Browse files
committed
Ensuring that flushing does not occur more than once. Fixes #951 #884
1 parent b29b3ab commit 17243ed

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/utils/debounce.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ export default function debounce(func, delay) {
55
const createLaterFunc = (args) => () => {
66
timeout = null;
77
func.apply(null, args);
8+
9+
// Only run the deferred function once
10+
laterFunc = undefined;
811
};
912

1013
const debouncedFunc = (...args) => {

0 commit comments

Comments
 (0)