From 1349a7975082e2afa64f4cc3b1c2d0d884991b4b Mon Sep 17 00:00:00 2001 From: Sanjai Kumar <84461672+sanjai0py@users.noreply.github.com> Date: Tue, 26 Mar 2024 18:57:02 +0530 Subject: [PATCH] fix environment toggle bug (#1932) --- .../EnvironmentDetails/EnvironmentVariables/index.js | 2 +- packages/bruno-app/src/utils/collections/index.js | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/packages/bruno-app/src/components/Environments/EnvironmentSettings/EnvironmentList/EnvironmentDetails/EnvironmentVariables/index.js b/packages/bruno-app/src/components/Environments/EnvironmentSettings/EnvironmentList/EnvironmentDetails/EnvironmentVariables/index.js index de521cf78..1220b193a 100644 --- a/packages/bruno-app/src/components/Environments/EnvironmentSettings/EnvironmentList/EnvironmentDetails/EnvironmentVariables/index.js +++ b/packages/bruno-app/src/components/Environments/EnvironmentSettings/EnvironmentList/EnvironmentDetails/EnvironmentVariables/index.js @@ -122,7 +122,7 @@ const EnvironmentVariables = ({ environment, collection }) => { {variable.secret ? ( -
{maskInputValue(variable.value)}
+
{maskInputValue(variable.value)}
) : ( { }; }; -export const maskInputValue = (value) => - value +export const maskInputValue = (value) => { + if (!value || typeof value !== 'string') { + return ''; + } + + return value .split('') .map(() => '*') .join(''); +};