mirror of
https://github.com/usebruno/bruno.git
synced 2024-11-07 08:34:15 +01:00
fix environment toggle bug (#1932)
This commit is contained in:
parent
c20beab0a0
commit
1349a79750
@ -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}
|
||||
|
@ -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('');
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user