[PR #6427] [MERGED] chore: fix typecheck #23560

Closed
opened 2026-04-15 21:49:25 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/6427
Author: @jslno
Created: 11/30/2025
Status: Merged
Merged: 11/30/2025
Merged by: @Bekacru

Base: canaryHead: 11-30-2025/fix-typecheck


📝 Commits (2)

📊 Changes

1 file changed (+1 additions, -1 deletions)

View changed files

📝 packages/better-auth/src/db/internal-adapter.ts (+1 -1)

📄 Description

Summary by cubic

Safely handle missing ctx.context.options in createInternalAdapter by using optional chaining and falling back to the function’s options when calling parseSessionInput. Fixes typecheck and prevents runtime errors when ctx or options are undefined.

Written for commit d90716bbb6. Summary will update automatically on new commits.


🔄 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/6427 **Author:** [@jslno](https://github.com/jslno) **Created:** 11/30/2025 **Status:** ✅ Merged **Merged:** 11/30/2025 **Merged by:** [@Bekacru](https://github.com/Bekacru) **Base:** `canary` ← **Head:** `11-30-2025/fix-typecheck` --- ### 📝 Commits (2) - [`711d57d`](https://github.com/better-auth/better-auth/commit/711d57dede2b73acc107d458cad3e5962c191c4f) chore: fix typecheck - [`d90716b`](https://github.com/better-auth/better-auth/commit/d90716bbb6aa962e3fd2e61f2a987ecd784f61ee) chore: properly fallback ### 📊 Changes **1 file changed** (+1 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/src/db/internal-adapter.ts` (+1 -1) </details> ### 📄 Description <!-- This is an auto-generated description by cubic. --> ## Summary by cubic Safely handle missing ctx.context.options in createInternalAdapter by using optional chaining and falling back to the function’s options when calling parseSessionInput. Fixes typecheck and prevents runtime errors when ctx or options are undefined. <sup>Written for commit d90716bbb6aa962e3fd2e61f2a987ecd784f61ee. Summary will update automatically on new commits.</sup> <!-- 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-15 21:49:25 -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#23560