Skip to content

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

Avoid error on signOut when using some frameworks

Christian Bertram937f4056b917
diff --git a/web/docs/guides/with-svelte.mdx b/web/docs/guides/with-svelte.mdx
index 060b4510152..65d02f4e744 100644
--- a/web/docs/guides/with-svelte.mdx
+++ b/web/docs/guides/with-svelte.mdx
@@ -405,8 +405,8 @@ Now that we have all the components in place, let's update `App.svelte`:
user.set(supabase.auth.user())
- supabase.auth.onAuthStateChange((_, session) => {
- user.set(session.user)
+ supabase.auth.onAuthStateChange((state, session) => {
+ user.set(state === 'SIGNED_IN' && session.user)
})
</script>