diff --git a/apps/web/app/api/workspace/watch/route.ts b/apps/web/app/api/workspace/watch/route.ts index 75dd64f8b96..e75777ced84 100644 --- a/apps/web/app/api/workspace/watch/route.ts +++ b/apps/web/app/api/workspace/watch/route.ts @@ -15,7 +15,7 @@ let listeners = new Set(); // eslint-disable-next-line @typescript-eslint/no-explicit-any let sharedWatcher: any = null; let sharedRoot: string | null = null; -let watcherReady = false; +let __watcherReady = false; async function ensureWatcher(root: string) { if (sharedWatcher && sharedRoot === root) {return;} @@ -25,7 +25,7 @@ async function ensureWatcher(root: string) { await sharedWatcher.close(); sharedWatcher = null; sharedRoot = null; - watcherReady = false; + _watcherReady = false; } try { @@ -54,7 +54,7 @@ async function ensureWatcher(root: string) { for (const fn of listeners) {fn(eventType, rel);} }); - sharedWatcher.once("ready", () => {watcherReady = true;}); + sharedWatcher.once("ready", () => {_watcherReady = true;}); sharedWatcher.on("error", () => { // Swallow; polling mode shouldn't hit EMFILE but be safe. @@ -69,7 +69,7 @@ function stopWatcherIfIdle() { sharedWatcher.close(); sharedWatcher = null; sharedRoot = null; - watcherReady = false; + _watcherReady = false; } /**