From 26307f26add30cf6562d5fccc27f5d7ea0f54f17 Mon Sep 17 00:00:00 2001 From: Dennis Thompson Date: Sun, 17 Aug 2025 21:48:06 -0700 Subject: [PATCH] Update src/api.ts Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --- src/api.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api.ts b/src/api.ts index 050ed86..d2a7d15 100644 --- a/src/api.ts +++ b/src/api.ts @@ -27,7 +27,7 @@ export interface GetToolsOptions { } function isOpenApiDocument(spec: string | OpenAPIV3.Document): spec is OpenAPIV3.Document { - return typeof spec === 'object' && 'openapi' in spec; + return typeof spec === 'object' && spec !== null && 'openapi' in spec; } /**