Skip to content

Commit 469fd24

Browse files
lucasgoralCopilot
andauthored
Update src/spaces/mcp/pages/McpPage.tsx
Co-authored-by: Copilot <[email protected]>
1 parent 55f6220 commit 469fd24

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/spaces/mcp/pages/McpPage.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,10 @@ export default function McpPage() {
5555
error,
5656
isLoading,
5757
} = useApiResource(ControlPlaneResource(projectName, workspaceName, controlPlaneName));
58-
// @ts-ignore
59-
const displayName = mcp?.metadata?.annotations?.[DISPLAY_NAME_ANNOTATION];
58+
const displayName =
59+
mcp?.metadata?.annotations && typeof mcp.metadata.annotations === 'object'
60+
? (mcp.metadata.annotations as Record<string, string | undefined>)[DISPLAY_NAME_ANNOTATION]
61+
: undefined;
6062
const onEditComponents = () => {
6163
setEditManagedControlPlaneWizardSection('componentSelection');
6264
setIsEditManagedControlPlaneWizardOpen(true);

0 commit comments

Comments
 (0)