Skip to content

Commit 20de0b8

Browse files
ibhagwantembo[bot]
andauthored
Update interface/src/hooks/useEventSource.ts
Co-authored-by: tembo[bot] <208362400+tembo[bot]@users.noreply.github.com>
1 parent a54d6f4 commit 20de0b8

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

interface/src/hooks/useEventSource.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ export function useEventSource(url: string, options: UseEventSourceOptions) {
107107
// on hide; connect() sets "connecting" (hidden by ConnectionBanner when
108108
// hasData is true) and onopen restores "connected".
109109
useEffect(() => {
110-
if (!enabled) return;
110+
if (!enabled || typeof document === "undefined") return;
111111

112112
const handleVisibilityChange = () => {
113113
if (document.hidden) {

0 commit comments

Comments
 (0)