Skip to content

Open-Source API Development Ecosystem • https://hoppscotch.io • Offline, On-Prem & Cloud • Web, Desktop & CLI • Open-Source Alternative to Postman, Insomnia

Make use of single argument Object

Liyas Thomaseb760b37e620
diff --git a/components/collections/importExportCollections.vue b/components/collections/importExportCollections.vue
index 6eba82a60..6c5fd0a50 100644
--- a/components/collections/importExportCollections.vue
+++ b/components/collections/importExportCollections.vue
@@ -177,7 +177,7 @@ export default {
icon: "error",
})
},
- parsePostmanCollection({ item, info, name }, folders = true) {
+ parsePostmanCollection(collection, folders = true) {
let postwomanCollection = folders
? [
{
@@ -190,13 +190,13 @@ export default {
name: "",
requests: [],
}
- for (let collectionItem of item) {
+ for (let collectionItem of collection.item) {
if (collectionItem.request) {
if (postwomanCollection[0]) {
- postwomanCollection[0].name = info ? info.name : ""
+ postwomanCollection[0].name = collection.info ? collection.info.name : ""
postwomanCollection[0].requests.push(this.parsePostmanRequest(collectionItem))
} else {
- postwomanCollection.name = name ? name : ""
+ postwomanCollection.name = collection.name ? collection.name : ""
postwomanCollection.requests.push(this.parsePostmanRequest(collectionItem))
}
} else if (collectionItem.item) {