Skip to content

Commit 3a7fc42

Browse files
waleedlatif1claude
andcommitted
fix(mcp): use undefined (not null) for cleared oauthClientId in cache
McpServer.oauthClientId is typed string | undefined on the client, so the prior `|| null` broke type-check. Empty string still normalizes to "cleared" in the optimistic cache write. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent 83de278 commit 3a7fc42

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

apps/sim/hooks/queries/mcp.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ export function useUpdateMcpServer() {
273273
const { oauthClientSecret: _omitSecret, oauthClientId, ...rest } = updates
274274
const safeUpdates: Partial<McpServer> = { ...rest }
275275
if (oauthClientId !== undefined) {
276-
safeUpdates.oauthClientId = oauthClientId || null
276+
safeUpdates.oauthClientId = oauthClientId || undefined
277277
}
278278
queryClient.setQueryData<McpServer[]>(
279279
mcpKeys.serversList(workspaceId),

0 commit comments

Comments
 (0)