chore: enforce brackets for if clause and for/while loops
This commit is contained in:
@@ -35,7 +35,9 @@ export function throttle<T extends (...args: any[]) => any>(
|
||||
fn(...args);
|
||||
} else {
|
||||
// Schedule for end of wait period (trailing edge)
|
||||
if (timeoutId) clearTimeout(timeoutId);
|
||||
if (timeoutId) {
|
||||
clearTimeout(timeoutId);
|
||||
}
|
||||
timeoutId = setTimeout(() => {
|
||||
lastCall = Date.now();
|
||||
fn(...args);
|
||||
|
||||
Reference in New Issue
Block a user