@reffuse/extension-query 0.1.4 #15

Merged
Thilawyn merged 340 commits from next into master 2025-05-26 04:15:01 +02:00
Showing only changes of commit 619dbe32ae - Show all commits

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
}) })