From f40b218deae1a38832eb24f8262033bbf6c4f054 Mon Sep 17 00:00:00 2001 From: Ivan Demchuk Date: Fri, 5 Apr 2024 12:05:55 +0300 Subject: [PATCH] Fix caching issue during SSR --- src/getContext.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/getContext.ts b/src/getContext.ts index c14679d3..e8fc74a8 100644 --- a/src/getContext.ts +++ b/src/getContext.ts @@ -52,7 +52,9 @@ export function getContext( // If we are in script setup, we cannot cache the context // because after component is unmounted, computed will not be updated - if (!fromSetup) + // Additionally we cannot cache on the server, because server is not reactive + const isServer = typeof window === 'undefined' + if (!fromSetup && !isServer) options._fluent = context return context