From 858be14934d6ef7c756a65a5fc3a1cc391297c13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Valverd=C3=A9?= Date: Mon, 7 Jul 2025 07:13:51 +0200 Subject: [PATCH] Fix --- packages/effect-fc/src/Hook.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/effect-fc/src/Hook.ts b/packages/effect-fc/src/Hook.ts index 3977afe..de45e88 100644 --- a/packages/effect-fc/src/Hook.ts +++ b/packages/effect-fc/src/Hook.ts @@ -19,7 +19,7 @@ export const useScope: { const [isInitialRun, initialScope] = React.useMemo(() => Runtime.runSync(runtime)(Effect.all([ Ref.make(true), - Scope.make(options?.finalizerExecutionStrategy ?? ExecutionStrategy.parallel), + Scope.make(options?.finalizerExecutionStrategy ?? ExecutionStrategy.sequential), ])), []) const [scope, setScope] = React.useState(initialScope) @@ -30,7 +30,7 @@ export const useScope: { () => closeScope(scope, runtime, options), ), - onFalse: () => Scope.make(options?.finalizerExecutionStrategy ?? ExecutionStrategy.parallel).pipe( + onFalse: () => Scope.make(options?.finalizerExecutionStrategy ?? ExecutionStrategy.sequential).pipe( Effect.tap(scope => Effect.sync(() => setScope(scope))), Effect.map(scope => () => closeScope(scope, runtime, options)), ),