From da5fdd54bd75dee3a4a820405e85b37dbfe86ac3 Mon Sep 17 00:00:00 2001 From: Scott Dutton Date: Sat, 5 Sep 2020 07:37:37 +0100 Subject: [PATCH] Import postman variables correctly (#1142) Co-authored-by: Liyas Thomas --- components/collections/import-export-collections.vue | 2 ++ 1 file changed, 2 insertions(+) diff --git a/components/collections/import-export-collections.vue b/components/collections/import-export-collections.vue index 93b91b9f..3a89735c 100644 --- a/components/collections/import-export-collections.vue +++ b/components/collections/import-export-collections.vue @@ -139,6 +139,8 @@ export default { // Do nothing } } else if (collections.info && collections.info.schema.includes("v2.1.0")) { + //replace the variables, postman uses {{var}}, Hoppscotch uses <> + collections = JSON.parse(content.replaceAll(/{{([a-z]+)}}/gi, '<<$1>>')) collections = this.parsePostmanCollection(collections) } else { return this.failedImport()