Fix
Some checks failed
Lint / lint (push) Failing after 12s

This commit is contained in:
Julien Valverdé
2025-05-22 16:18:03 +02:00
parent 28efea18f1
commit 619dbe32ae

View File

@@ -192,13 +192,8 @@ export const run = <K extends readonly unknown[], A, E, R>(
self: QueryRunner<K, A, E, R>, self: QueryRunner<K, A, E, R>,
options?: RunOptions, options?: RunOptions,
): Effect.Effect<void, Error | Cause.NoSuchElementException, Scope.Scope> => Effect.gen(function*() { ): Effect.Effect<void, Error | Cause.NoSuchElementException, Scope.Scope> => Effect.gen(function*() {
if (options?.refreshOnWindowFocus ?? true) if (typeof window !== "undefined" && (options?.refreshOnWindowFocus ?? true))
yield* Stream.runForEach( yield* Stream.runForEach(BrowserStream.fromEventListenerWindow("focus"), () => self.forkRefresh)
typeof window !== "undefined"
? BrowserStream.fromEventListenerWindow("focus")
: Stream.empty,
() => self.forkRefresh,
)
yield* self.fetchOnKeyChange yield* self.fetchOnKeyChange
}) })