Skip to content

Commit

Permalink
chore: apply automated fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
autofix-ci[bot] authored Nov 20, 2023
1 parent e909050 commit 2d705de
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/runtime/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,20 +70,20 @@ function _applyEnv(obj: object, parentKey = "") {
if (_isObject(obj[key])) {
// Same as before
if (_isObject(envValue)) {
obj[key] = { ...obj[key], ...envValue as object };
obj[key] = { ...obj[key], ...(envValue as object) };
_applyEnv(obj[key], subKey);
}
// If envValue is undefined
// If envValue is undefined
// Then proceed to nested properties
else if (envValue === undefined) {
_applyEnv(obj[key], subKey);
}
// If envValue is a primitive other than undefined
// If envValue is a primitive other than undefined
// Then set objValue and ignore the nested properties
else {
obj[key] = envValue ?? obj[key];
}
} else {
} else {
obj[key] = envValue ?? obj[key];
}
}
Expand Down

0 comments on commit 2d705de

Please sign in to comment.