diff --git a/src/objects.ts b/src/objects.ts index b8288c7..8895888 100644 --- a/src/objects.ts +++ b/src/objects.ts @@ -24,7 +24,11 @@ export function omit(object: T, ...keys: re export function assignWithDefaults(to: To, from: From, defaults: Partial = to): void { const keys = new Set([...Object.keys(to), ...Object.keys(from)]); for (const key of keys) { - to[key] = from[key] ?? defaults[key] ?? to[key]; + try { + to[key] = from[key] ?? defaults[key] ?? to[key]; + } catch (e) { + // Do nothing + } } }