diff --git a/packages/hoppscotch-common/src/components/environments/my/Details.vue b/packages/hoppscotch-common/src/components/environments/my/Details.vue index 8327e8dd3..7b8969249 100644 --- a/packages/hoppscotch-common/src/components/environments/my/Details.vue +++ b/packages/hoppscotch-common/src/components/environments/my/Details.vue @@ -416,9 +416,7 @@ const saveEnvironment = () => { const variables = pipe( filteredVariables, - A.map((e) => - e.secret ? { key: e.key, secret: e.secret, value: undefined } : e - ) + A.map((e) => (e.secret ? { key: e.key, secret: e.secret } : e)) ) const environmentUpdated: Environment = { diff --git a/packages/hoppscotch-common/src/components/environments/teams/Details.vue b/packages/hoppscotch-common/src/components/environments/teams/Details.vue index 1f9673e2a..6af413e1e 100644 --- a/packages/hoppscotch-common/src/components/environments/teams/Details.vue +++ b/packages/hoppscotch-common/src/components/environments/teams/Details.vue @@ -360,7 +360,7 @@ const saveEnvironment = async () => { return } - const filterdVariables = pipe( + const filteredVariables = pipe( vars.value, A.filterMap( flow( @@ -371,17 +371,15 @@ const saveEnvironment = async () => { ) const secretVariables = pipe( - filterdVariables, + filteredVariables, A.filterMapWithIndex((i, e) => e.secret ? O.some({ key: e.key, value: e.value, varIndex: i }) : O.none ) ) const variables = pipe( - filterdVariables, - A.map((e) => - e.secret ? { key: e.key, secret: e.secret, value: undefined } : e - ) + filteredVariables, + A.map((e) => (e.secret ? { key: e.key, secret: e.secret } : e)) ) const environmentUpdated: Environment = {