Skip to content

Commit 2883196

Browse files
committed
Don't create extra watchers when switching tabs
1 parent 09f2a6e commit 2883196

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

client/src/composables/resourceWatcher.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ export function useResourceWatcher<T = unknown>(
111111
function updateThrottle() {
112112
if (document.visibilityState === "visible") {
113113
currentPollingInterval = shortPollingInterval;
114-
startWatchingResource();
114+
startWatchingResourceIfNeeded();
115115
} else {
116116
currentPollingInterval = enableBackgroundPolling ? longPollingInterval : undefined;
117117
}

0 commit comments

Comments
 (0)