diff --git a/packages/hoppscotch-common/src/helpers/import-export/import/openapi.ts b/packages/hoppscotch-common/src/helpers/import-export/import/openapi.ts index 2678389d..1d4516ed 100644 --- a/packages/hoppscotch-common/src/helpers/import-export/import/openapi.ts +++ b/packages/hoppscotch-common/src/helpers/import-export/import/openapi.ts @@ -745,7 +745,9 @@ const parseOpenAPIUrl = ( **/ if (objectHasProperty(doc, "swagger")) { - return `${doc.host}${doc.basePath}` + const { host = "<>", basePath = "" } = + doc satisfies OpenAPIV2.Document + return `${host}${basePath}` } /**