Skip to content

Commit

Permalink
fix environment toggle bug (usebruno#1932)
Browse files Browse the repository at this point in the history
  • Loading branch information
sanjai0py authored Mar 26, 2024
1 parent c20beab commit 1349a79
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ const EnvironmentVariables = ({ environment, collection }) => {
</td>
<td>
{variable.secret ? (
<div>{maskInputValue(variable.value)}</div>
<div className="overflow-hidden text-ellipsis">{maskInputValue(variable.value)}</div>
) : (
<SingleLineEditor
theme={storedTheme}
Expand Down
9 changes: 7 additions & 2 deletions packages/bruno-app/src/utils/collections/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -640,8 +640,13 @@ export const getAllVariables = (collection) => {
};
};

export const maskInputValue = (value) =>
value
export const maskInputValue = (value) => {
if (!value || typeof value !== 'string') {
return '';
}

return value
.split('')
.map(() => '*')
.join('');
};

0 comments on commit 1349a79

Please sign in to comment.