Skip to content

Commit

Permalink
fix(bonsai-core): online handler is on window (#1440)
Browse files Browse the repository at this point in the history
  • Loading branch information
tyleroooo authored Jan 16, 2025
1 parent 190cb3c commit 0eeaa2d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/hooks/useInitializePage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,9 @@ export const useInitializePage = () => {
IndexerWebsocketManager.getActiveResources().forEach((r) => r.restart());
logAbacusTsInfo('useInitializePage', 'restarting because network status change');
};
document.addEventListener('online', handleOnline);
window.addEventListener('online', handleOnline);
return () => {
document.removeEventListener('online', handleOnline);
window.removeEventListener('online', handleOnline);
};
}, [localStorageNetwork]);
};

0 comments on commit 0eeaa2d

Please sign in to comment.