diff --git a/packages/ui/src/helpers.ts b/packages/ui/src/helpers.ts index d0dc6ffa..a0337ec5 100644 --- a/packages/ui/src/helpers.ts +++ b/packages/ui/src/helpers.ts @@ -1784,7 +1784,7 @@ function convertRestfoxAuthToInsomniaAuth(auth: any) { export function convertPostmanAuthToRestfoxAuth(request: any) { let authentication: RequestAuthentication = { type: 'No Auth' } - if('auth' in request) { + if('auth' in request && request.auth) { const authType = request.auth.type if(authType === 'bearer' && request.auth.bearer) { diff --git a/packages/ui/src/parsers/postman.ts b/packages/ui/src/parsers/postman.ts index d4dee8f9..720dcbad 100644 --- a/packages/ui/src/parsers/postman.ts +++ b/packages/ui/src/parsers/postman.ts @@ -131,6 +131,9 @@ function handlePostmanV2CollectionItem(postmanCollectionItem: any, parentId: str const plugins: Plugin[] = [] postmanCollectionItem.item.forEach((request: any) => { + if(!request) { + return + } const requestId = request.id ?? nanoid() if('item' in request) { const { convertedRequests, plugins: newPlugins } = handlePostmanV2CollectionItem(request, requestId, workspaceId)