From f470f0996bd88c039e7867e7d23ce232cff2e32b Mon Sep 17 00:00:00 2001 From: Basil Hosmer Date: Thu, 15 May 2025 10:16:49 -0400 Subject: [PATCH] fix type error in testOutputSchemaServers.ts --- src/examples/client/testOutputSchemaServers.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/examples/client/testOutputSchemaServers.ts b/src/examples/client/testOutputSchemaServers.ts index ba6e6b28..b2a083a2 100755 --- a/src/examples/client/testOutputSchemaServers.ts +++ b/src/examples/client/testOutputSchemaServers.ts @@ -69,9 +69,9 @@ async function main() { console.log(JSON.stringify(weatherResult.structuredContent, null, 2)); } - if (weatherResult.content) { + if (weatherResult.content && Array.isArray(weatherResult.content)) { console.log("Unstructured content:"); - weatherResult.content.forEach(content => { + weatherResult.content.forEach((content: any) => { if (content.type === "text") { console.log(content.text); }