]> git.ipfire.org Git - thirdparty/vuejs/pinia.git/commitdiff
fix: shouldHydrate if not in skipHydrateMap (#846)
authorYasser Lahbibi <yasser.lahbibi@apenhet.com>
Sun, 28 Nov 2021 12:03:32 +0000 (13:03 +0100)
committerGitHub <noreply@github.com>
Sun, 28 Nov 2021 12:03:32 +0000 (13:03 +0100)
packages/pinia/src/store.ts

index 45234ad2124dd0852c55e16a1af9af1ea35ee06c..f3682d86fc7cc35b2ba50a01a454e438b2539479 100644 (file)
@@ -88,7 +88,7 @@ export function skipHydrate<T = any>(obj: T): T {
 
 function shouldHydrate(obj: any) {
   return isVue2
-    ? /* istanbul ignore next */ skipHydrateMap.has(obj)
+    ? /* istanbul ignore next */ !skipHydrateMap.has(obj)
     : !isPlainObject(obj) || !obj.hasOwnProperty(skipHydrateSymbol)
 }