mirror of
https://github.com/usebruno/bruno.git
synced 2024-11-22 16:03:39 +01:00
fix(#399): loading environment with empty secret variable fails
This commit is contained in:
parent
4e4130acf5
commit
a71afc8f73
@ -103,7 +103,7 @@ const addEnvironmentFile = async (win, pathname, collectionUid, collectionPath)
|
||||
const envSecrets = environmentSecretsStore.getEnvSecrets(collectionPath, file.data);
|
||||
_.each(envSecrets, (secret) => {
|
||||
const variable = _.find(file.data.variables, (v) => v.name === secret.name);
|
||||
if (variable) {
|
||||
if (variable && secret.value) {
|
||||
variable.value = decryptString(secret.value);
|
||||
}
|
||||
});
|
||||
@ -137,7 +137,7 @@ const changeEnvironmentFile = async (win, pathname, collectionUid, collectionPat
|
||||
const envSecrets = environmentSecretsStore.getEnvSecrets(collectionPath, file.data);
|
||||
_.each(envSecrets, (secret) => {
|
||||
const variable = _.find(file.data.variables, (v) => v.name === secret.name);
|
||||
if (variable) {
|
||||
if (variable && secret.value) {
|
||||
variable.value = decryptString(secret.value);
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user