Skip to content

Commit

Permalink
fix: failing to import insomnia collection when username/password in …
Browse files Browse the repository at this point in the history
…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 eec0e51.
  • Loading branch information
jake-owen-p authored Oct 13, 2024
1 parent dce96e0 commit 2fc79e0
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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(' ', ''));
Expand Down

0 comments on commit 2fc79e0

Please sign in to comment.