fix environment toggle bug (#1932)

This commit is contained in:
Sanjai Kumar 2024-03-26 18:57:02 +05:30 committed by GitHub
parent c20beab0a0
commit 1349a79750
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 8 additions and 3 deletions

View File

@ -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}

View File

@ -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('');
};