fix: secret env bug in firebase due to undefined value (#3881)

Co-authored-by: jamesgeorge007 <jamesgeorge998001@gmail.com>
This commit is contained in:
Nivedin
2024-03-13 17:11:51 +05:30
committed by GitHub
parent be7387ed19
commit 41d617b507
8 changed files with 26 additions and 24 deletions

View File

@@ -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 = {