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>
|
||||||
<td>
|
<td>
|
||||||
{variable.secret ? (
|
{variable.secret ? (
|
||||||
<div>{maskInputValue(variable.value)}</div>
|
<div className="overflow-hidden text-ellipsis">{maskInputValue(variable.value)}</div>
|
||||||
) : (
|
) : (
|
||||||
<SingleLineEditor
|
<SingleLineEditor
|
||||||
theme={storedTheme}
|
theme={storedTheme}
|
||||||
|
@ -640,8 +640,13 @@ export const getAllVariables = (collection) => {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
export const maskInputValue = (value) =>
|
export const maskInputValue = (value) => {
|
||||||
value
|
if (!value || typeof value !== 'string') {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
|
||||||
|
return value
|
||||||
.split('')
|
.split('')
|
||||||
.map(() => '*')
|
.map(() => '*')
|
||||||
.join('');
|
.join('');
|
||||||
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user