mirror of
https://github.com/2234839/web-font.git
synced 2025-04-06 05:25:44 +08:00
typo
This commit is contained in:
parent
c6567b8948
commit
6b49d15eae
@ -49,13 +49,15 @@ function useThrottledMemo<T>(fn: () => T, delay: number): Accessor<T> {
|
||||
createMemo(() => {
|
||||
const value = fn();
|
||||
if (timeoutId === null) {
|
||||
// @ts-expect-error
|
||||
setThrottledValue(value);
|
||||
timeoutId = setTimeout(() => {
|
||||
timeoutId = null;
|
||||
// @ts-expect-error
|
||||
setThrottledValue(fn());
|
||||
}, delay);
|
||||
}
|
||||
});
|
||||
|
||||
return throttledValue;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user