Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

Remove combineChunks from SvelteKit browser client cookie getter (#19168)

Brian Kintzae5b0558925b
diff --git a/apps/docs/pages/guides/auth/server-side/creating-a-client.mdx b/apps/docs/pages/guides/auth/server-side/creating-a-client.mdx
index ec694df0af2..fdecf123a00 100644
--- a/apps/docs/pages/guides/auth/server-side/creating-a-client.mdx
+++ b/apps/docs/pages/guides/auth/server-side/creating-a-client.mdx
@@ -468,7 +468,7 @@ Page components can get access to the supabase client from the `data` object due
```ts +layout.ts
import { PUBLIC_SUPABASE_ANON_KEY, PUBLIC_SUPABASE_URL } from '$env/static/public'
import type { LayoutLoad } from './$types'
-import { combineChunks, createBrowserClient, isBrowser, parse } from '@supabase/ssr'
+import { createBrowserClient, isBrowser, parse } from '@supabase/ssr'
export const load: LayoutLoad = async ({ fetch, data, depends }) => {
depends('supabase:auth')
@@ -483,11 +483,8 @@ export const load: LayoutLoad = async ({ fetch, data, depends }) => {
return JSON.stringify(data.session)
}
- const cookie = combineChunks(key, (name) => {
- const cookies = parse(document.cookie)
- return cookies[name]
- })
- return cookie
+ const cookie = parse(document.cookie)
+ return cookie[key]
},
},
})