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 1ea2a758..c2db7c2b 100644 --- a/packages/hoppscotch-common/src/helpers/import-export/import/openapi.ts +++ b/packages/hoppscotch-common/src/helpers/import-export/import/openapi.ts @@ -735,7 +735,7 @@ const parseOpenAPIUrl = ( * Relevant v3 reference: https://swagger.io/specification/#server-object **/ if (objectHasProperty(doc, "servers")) { - return doc.servers?.[0].url ?? "<>" + return doc.servers?.[0]?.url ?? "<>" } // If the document is neither v2 nor v3 then return a env variable as placeholder