We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1a89a91 commit 374be57Copy full SHA for 374be57
packages/dev/commands/dev.ts
@@ -239,9 +239,9 @@ export function registerDevCommand(cli: CAC) {
239
const route = config.getRoute(absPath, config.dir);
240
if (!route) return;
241
242
- // Debounce reloads to prevent multiple rapid reloads
243
- if (reloadState.timeouts.has(absPath)) {
244
- clearTimeout(reloadState.timeouts.get(absPath)!);
+ const existingTimeout = reloadState.timeouts.get(absPath);
+ if (existingTimeout) {
+ clearTimeout(existingTimeout);
245
}
246
if (reloadState.reloading.has(absPath)) {
247
return;
0 commit comments