From 6211d174e03587f66f0c5b91af4a438e556357f7 Mon Sep 17 00:00:00 2001 From: Lenz Weber-Tronic Date: Fri, 15 Sep 2023 14:02:11 +0200 Subject: [PATCH] move cleanup out of observer --- package/src/ssr/NextSSRApolloClient.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package/src/ssr/NextSSRApolloClient.tsx b/package/src/ssr/NextSSRApolloClient.tsx index 3a10b677..69fdc4aa 100644 --- a/package/src/ssr/NextSSRApolloClient.tsx +++ b/package/src/ssr/NextSSRApolloClient.tsx @@ -124,6 +124,7 @@ export class NextSSRApolloClient< ); }); + promise.finally(cleanup); byVariables.set( varJson, (observable = new Observable((observer) => { @@ -134,8 +135,7 @@ export class NextSSRApolloClient< }) .catch((err) => { observer.error(err); - }) - .finally(cleanup); + }); })) );