fix: updates

This commit is contained in:
lohxt1 2024-12-16 22:13:26 +05:30
parent 7a8d1624d1
commit e44dcad01a
3 changed files with 4 additions and 4 deletions

View File

@ -798,7 +798,7 @@ export const getGlobalEnvironmentVariables = ({ globalEnvironments, activeGlobal
if (environment) {
each(environment.variables, (variable) => {
if (variable.name && variable.enabled) {
variables[variable.name] = variable.value || '';
variables[variable.name] = variable.value;
}
});
}

View File

@ -173,4 +173,4 @@ export const generateUidBasedOnHash = (str) => {
return `${hash}`.padEnd(21, '0');
};
export const stringifyIfNot = v => typeof v === 'string' ? v : '';
export const stringifyIfNot = v => typeof v === 'string' ? v : String(v);

View File

@ -18,7 +18,7 @@ class GlobalEnvironmentsStore {
return globalEnvironments?.map(env => {
const variables = env.variables?.map(v => ({
...v,
value: v?.secret ? (this.isValidValue(v.value) ? encryptString(v.value) : '') : (v?.value || '')
value: v?.secret ? (this.isValidValue(v.value) ? encryptString(v.value) : '') : v?.value
})) || [];
return {
@ -32,7 +32,7 @@ class GlobalEnvironmentsStore {
return globalEnvironments?.map(env => {
const variables = env.variables?.map(v => ({
...v,
value: v?.secret ? (this.isValidValue(v.value) ? decryptString(v.value) : '') : (v?.value || '')
value: v?.secret ? (this.isValidValue(v.value) ? decryptString(v.value) : '') : v?.value
})) || [];
return {