mirror of
https://github.com/usebruno/bruno.git
synced 2025-01-08 23:18:54 +01:00
Fix import error
This commit is contained in:
parent
da9afcabe8
commit
c6440ab849
@ -68,8 +68,8 @@ const importPostmanV2CollectionItem = (brunoParent, item) => {
|
||||
if (!brunoRequestItem.request.script) {
|
||||
brunoRequestItem.request.script = {};
|
||||
}
|
||||
if (Array.isArray(event.script.exec[0])) {
|
||||
brunoRequestItem.request.script.req = event.script.exec[0].map((line) => `// ${line}`).join('\n');
|
||||
if (Array.isArray(event.script.exec)) {
|
||||
brunoRequestItem.request.script.req = event.script.exec.map((line) => `// ${line}`).join('\n');
|
||||
} else {
|
||||
brunoRequestItem.request.script.req = `// ${event.script.exec[0]} `;
|
||||
}
|
||||
@ -78,8 +78,8 @@ const importPostmanV2CollectionItem = (brunoParent, item) => {
|
||||
if (!brunoRequestItem.request.tests) {
|
||||
brunoRequestItem.request.tests = {};
|
||||
}
|
||||
if (Array.isArray(event.script.exec[0])) {
|
||||
brunoRequestItem.request.tests = event.script.exec[0].map((line) => `// ${line}`).join('\n');
|
||||
if (Array.isArray(event.script.exec)) {
|
||||
brunoRequestItem.request.tests = event.script.exec.map((line) => `// ${line}`).join('\n');
|
||||
} else {
|
||||
brunoRequestItem.request.tests = `// ${event.script.exec[0]} `;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user