mirror of
https://github.com/Kong/insomnia
synced 2024-11-07 22:30:15 +00:00
Fix undefined id causing improper import (#1302)
Fix undefined id causing improper import
This commit is contained in:
parent
931f01c447
commit
7bdd40892d
@ -122,8 +122,9 @@ function parseEndpoints(document) {
|
||||
let { tags } = endpointSchema;
|
||||
if (!tags || tags.length == 0) tags = [''];
|
||||
tags.forEach((tag, index) => {
|
||||
let id =
|
||||
endpointSchema.operationId + (index > 0 ? index : '') || `__REQUEST_${requestCount++}__`;
|
||||
let id = endpointSchema.operationId
|
||||
? `${endpointSchema.operationId}${index > 0 ? index : ''}`
|
||||
: `__REQUEST_${requestCount++}__`;
|
||||
let parentId = folderLookup[tag] || defaultParent;
|
||||
requests.push(importRequest(endpointSchema, globalMimeTypes, id, parentId));
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user