[PR #4955] [MERGED] docs: fix sveltekit client session store example #31280

Closed
opened 2026-04-17 22:10:14 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/4955
Author: @icalvin102
Created: 9/28/2025
Status: Merged
Merged: 9/30/2025
Merged by: @himself65

Base: canaryHead: docs/sveltekit-client-store


📝 Commits (1)

  • 9042570 docs: fix sveltekit client session store example

📊 Changes

2 files changed (+4 additions, -4 deletions)

View changed files

📝 docs/content/docs/concepts/client.mdx (+3 -3)
📝 docs/content/docs/integrations/svelte-kit.mdx (+1 -1)

📄 Description

Fixes

  • Fixes session check in sveltekit client example
  • Remove unnecessary optional chaining operators in sveltekit examples

Summary by cubic

Fixes the SvelteKit client session store examples to correctly check $session.data and access user fields without optional chaining. This makes the docs examples render reliably in Svelte templates.

  • Bug Fixes
    • Use {#if $session.data} instead of {#if $session}.
    • Replace {$session?.data?.user.} with {$session.data.user.}.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/better-auth/better-auth/pull/4955 **Author:** [@icalvin102](https://github.com/icalvin102) **Created:** 9/28/2025 **Status:** ✅ Merged **Merged:** 9/30/2025 **Merged by:** [@himself65](https://github.com/himself65) **Base:** `canary` ← **Head:** `docs/sveltekit-client-store` --- ### 📝 Commits (1) - [`9042570`](https://github.com/better-auth/better-auth/commit/904257037cf8b35811e3b3cfa373c3d416823912) docs: fix sveltekit client session store example ### 📊 Changes **2 files changed** (+4 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `docs/content/docs/concepts/client.mdx` (+3 -3) 📝 `docs/content/docs/integrations/svelte-kit.mdx` (+1 -1) </details> ### 📄 Description Fixes - Fixes session check in sveltekit client example - Remove unnecessary optional chaining operators in sveltekit examples <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Fixes the SvelteKit client session store examples to correctly check $session.data and access user fields without optional chaining. This makes the docs examples render reliably in Svelte templates. - **Bug Fixes** - Use {#if $session.data} instead of {#if $session}. - Replace {$session?.data?.user.*} with {$session.data.user.*}. <!-- End of auto-generated description by cubic. --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-17 22:10:14 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#31280