[PR #2133] [MERGED] fix(organization): fix inverted teamId inference in conditional types #12417

Closed
opened 2026-04-13 08:22:11 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/2133
Author: @Netrifier
Created: 4/4/2025
Status: Merged
Merged: 4/4/2025
Merged by: @Bekacru

Base: mainHead: fix-organization-team-inference-types


📝 Commits (1)

  • fe5d874 fix(organization): fix conditional teamId inference

📊 Changes

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

View changed files

📝 packages/better-auth/src/plugins/organization/schema.ts (+3 -3)

📄 Description

Fixes incorrect teamId inferrence in InferMember and InferInvitation, where teamId was being inferred on type when teams where not enabled and omitted when teams were enabled


🔄 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/2133 **Author:** [@Netrifier](https://github.com/Netrifier) **Created:** 4/4/2025 **Status:** ✅ Merged **Merged:** 4/4/2025 **Merged by:** [@Bekacru](https://github.com/Bekacru) **Base:** `main` ← **Head:** `fix-organization-team-inference-types` --- ### 📝 Commits (1) - [`fe5d874`](https://github.com/better-auth/better-auth/commit/fe5d8749a760fcd868f2da396905de0ab677d4b0) fix(organization): fix conditional teamId inference ### 📊 Changes **1 file changed** (+3 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/src/plugins/organization/schema.ts` (+3 -3) </details> ### 📄 Description Fixes incorrect `teamId` inferrence in `InferMember` and `InferInvitation`, where `teamId` was being inferred on type when teams where not enabled and omitted when teams were enabled --- <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-13 08:22:11 -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#12417