diff --git a/packages/bruno-app/src/utils/importers/insomnia-collection.js b/packages/bruno-app/src/utils/importers/insomnia-collection.js index f936c196d..0e887a6d3 100644 --- a/packages/bruno-app/src/utils/importers/insomnia-collection.js +++ b/packages/bruno-app/src/utils/importers/insomnia-collection.js @@ -60,12 +60,12 @@ const addSuffixToDuplicateName = (item, index, allItems) => { const regexVariable = new RegExp('{{.*?}}', 'g'); const normalizeVariables = (value) => { - value = value || ''; - const variables = value.match(regexVariable) || []; + const sanitizedValue = value || ''; + const variables = sanitizedValue.match(regexVariable) || []; each(variables, (variable) => { - value = value.replace(variable, variable.replace('_.', '').replaceAll(' ', '')); + sanitizedValue = sanitizedValue.replace(variable, variable.replace('_.', '').replaceAll(' ', '')); }); - return value; + return sanitizedValue; }; const transformInsomniaRequestItem = (request, index, allRequests) => {