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:
Robin Malfait 2025-08-27 17:15:26 +02:00
parent 81c883d035
commit 8bda1db8c8
No known key found for this signature in database

View file

@ -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
}