From 2fc79e0e7f2027689fd72667ff1735b84499b8bd Mon Sep 17 00:00:00 2001 From: Jake Owen <67201741+jake-owen-p@users.noreply.github.com> Date: Sun, 13 Oct 2024 13:25:13 +0100 Subject: [PATCH] fix: failing to import insomnia collection when username/password in auth is null (#3293) * fix: sanitize authentication input edgecase where value is null instead of expected empty string * fix: refactor to be immutable * Revert "fix: refactor to be immutable" This reverts commit eec0e51d98348b32f08ac5dc21b2ccc4c32a28d5. --- packages/bruno-app/src/utils/importers/insomnia-collection.js | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/bruno-app/src/utils/importers/insomnia-collection.js b/packages/bruno-app/src/utils/importers/insomnia-collection.js index ae74f1613..f936c196d 100644 --- a/packages/bruno-app/src/utils/importers/insomnia-collection.js +++ b/packages/bruno-app/src/utils/importers/insomnia-collection.js @@ -60,6 +60,7 @@ const addSuffixToDuplicateName = (item, index, allItems) => { const regexVariable = new RegExp('{{.*?}}', 'g'); const normalizeVariables = (value) => { + value = value || ''; const variables = value.match(regexVariable) || []; each(variables, (variable) => { value = value.replace(variable, variable.replace('_.', '').replaceAll(' ', ''));