From 6c57b169dadf638485cec7777d0c932b62f0d8bb Mon Sep 17 00:00:00 2001 From: Chris-Robin Ennen Date: Fri, 12 Jan 2024 14:14:59 +0100 Subject: [PATCH] pinia can never be undefined in `dehydratePinia` Signed-off-by: Chris-Robin Ennen --- packages/vike-pinia/renderer/dehydratePinia.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/vike-pinia/renderer/dehydratePinia.ts b/packages/vike-pinia/renderer/dehydratePinia.ts index 6068f980..8fdbd011 100644 --- a/packages/vike-pinia/renderer/dehydratePinia.ts +++ b/packages/vike-pinia/renderer/dehydratePinia.ts @@ -6,5 +6,5 @@ export { dehydratePinia } type PiniaOnAfterRenderSSRApp = OnAfterRenderSSRApp const dehydratePinia: PiniaOnAfterRenderSSRApp = ({ pinia }): ReturnType => { - return { piniaInitialState: pinia.state.value } + return { piniaInitialState: pinia!.state.value } }