Update src/api.ts

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
This commit is contained in:
Dennis Thompson 2025-08-17 21:48:06 -07:00 committed by GitHub
parent b7bc67e444
commit 26307f26ad
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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;
}
/**