fix(persistence-service): update global environment variables schema (#3829)
This commit is contained in:
@@ -628,7 +628,7 @@ export class PersistenceService extends Service {
|
||||
|
||||
private setupGlobalEnvsPersistence() {
|
||||
const globalEnvKey = "globalEnv"
|
||||
let globalEnvData: Environment["variables"] = JSON.parse(
|
||||
let globalEnvData: z.infer<typeof GLOBAL_ENV_SCHEMA> = JSON.parse(
|
||||
window.localStorage.getItem(globalEnvKey) || "[]"
|
||||
)
|
||||
|
||||
@@ -644,7 +644,7 @@ export class PersistenceService extends Service {
|
||||
)
|
||||
}
|
||||
|
||||
setGlobalEnvVariables(globalEnvData)
|
||||
setGlobalEnvVariables(globalEnvData as Environment["variables"])
|
||||
|
||||
globalEnv$.subscribe((vars) => {
|
||||
window.localStorage.setItem(globalEnvKey, JSON.stringify(vars))
|
||||
|
||||
Reference in New Issue
Block a user