do not assume source is an object
Otherwise `Reflect.ownKeys` would crash on non-object values. Co-Authored-By: Jordan Pittman <thecrypticace@gmail.com>
This commit is contained in:
parent
81c883d035
commit
8bda1db8c8
1 changed files with 1 additions and 1 deletions
|
|
@ -17,7 +17,7 @@ export function deepMerge<T extends object>(
|
|||
type Value = T[Key]
|
||||
|
||||
for (let source of sources) {
|
||||
if (source === null || source === undefined) {
|
||||
if (source === null || source === undefined || typeof source !== 'object') {
|
||||
continue
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue