fix(async): improve debounce node.js compatibility (#5419)

This commit is contained in:
notomo 2024-07-12 13:29:44 +09:00 committed by GitHub
parent 22d3bda488
commit 369901d027
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -58,7 +58,7 @@ export function debounce<T extends Array<any>>(
debounced.clear();
fn.call(debounced, ...args);
};
timeout = setTimeout(flush, wait);
timeout = Number(setTimeout(flush, wait));
}) as DebouncedFunction<T>;
debounced.clear = () => {