mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-04-14 16:40:58 -04:00
fix: debounce.flush not invoked if lastArgs not defined (#3281)
This commit is contained in:
parent
c3ecbcb3ab
commit
fa8c7abf50
1 changed files with 1 additions and 3 deletions
|
@ -131,9 +131,7 @@ export const debounce = <T extends any[]>(
|
|||
};
|
||||
ret.flush = () => {
|
||||
clearTimeout(handle);
|
||||
if (lastArgs) {
|
||||
fn(...lastArgs);
|
||||
}
|
||||
fn(...(lastArgs || []));
|
||||
};
|
||||
ret.cancel = () => {
|
||||
clearTimeout(handle);
|
||||
|
|
Loading…
Add table
Reference in a new issue