Skip to content

Commit 47663c3

Browse files
Merge master into feature/emr
2 parents 80b36d6 + 0acb7ae commit 47663c3

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

packages/core/src/shared/settings.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -389,6 +389,10 @@ function createSettingsClass<T extends TypeDescriptor>(section: string, descript
389389
public _getOrThrow<K extends keyof Inner>(key: K & string, defaultValue?: Inner[K]) {
390390
const value = this.#config.get(key, defaultValue)
391391

392+
if (defaultValue !== undefined && (value === undefined || value === null)) {
393+
return defaultValue
394+
}
395+
392396
return cast<Inner[K]>(value, descriptor[key])
393397
}
394398

0 commit comments

Comments
 (0)