From a37a560ca55bc4c2c852a8b0a877cb49012885c5 Mon Sep 17 00:00:00 2001 From: Guillaume Chau Date: Sun, 28 Nov 2021 19:34:36 +0100 Subject: [PATCH] fix: useSubscription outside of component --- packages/vue-apollo-composable/src/useSubscription.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/vue-apollo-composable/src/useSubscription.ts b/packages/vue-apollo-composable/src/useSubscription.ts index 88042822..da5af05c 100644 --- a/packages/vue-apollo-composable/src/useSubscription.ts +++ b/packages/vue-apollo-composable/src/useSubscription.ts @@ -280,7 +280,7 @@ export function useSubscription < }) // Teardown - onBeforeUnmount(stop) + vm && onBeforeUnmount(stop) return { result,