Skip to content

Commit 1856635

Browse files
committed
fix(whitelabeling): cast activeOrganizationId on session for TS build
1 parent 91ce55e commit 1856635

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

apps/sim/app/workspace/[workspaceId]/layout.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ import { getOrgWhitelabelSettings } from '@/ee/whitelabeling/org-branding'
1313

1414
export default async function WorkspaceLayout({ children }: { children: React.ReactNode }) {
1515
const session = await getSession()
16-
const orgId = session?.session?.activeOrganizationId
16+
// The organization plugin is conditionally spread so TS can't infer activeOrganizationId on the base session type.
17+
const orgId = (session?.session as { activeOrganizationId?: string } | null)?.activeOrganizationId
1718
const initialOrgSettings = orgId ? await getOrgWhitelabelSettings(orgId) : null
1819

1920
return (

0 commit comments

Comments
 (0)