fix(persistence-service): add fallbacks for environments related schemas (#3832)

This commit is contained in:
James George
2024-02-15 23:38:56 +05:30
committed by GitHub
parent ed6e9b6954
commit 4bd54b12cd
4 changed files with 18 additions and 4 deletions

View File

@@ -568,7 +568,18 @@ export function getLegacyGlobalEnvironment(): Environment | null {
}
export function getGlobalVariables(): Environment["variables"] {
return environmentsStore.value.globals
return environmentsStore.value.globals.map(
(env: Environment["variables"][number]) => {
if (env.key && "value" in env && !("secret" in env)) {
return {
...(env as Environment["variables"][number]),
secret: false,
}
}
return env
}
) as Environment["variables"]
}
export function getGlobalVariableID() {