Skip to content

Commit 2a945a6

Browse files
committed
fix(std/merge): check is null
1 parent ed902e8 commit 2a945a6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/std/src/merge/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
const isPlainObject = (value: unknown): value is Record<string, unknown> =>
2-
Object.getPrototypeOf(value) === Object.prototype
1+
const isPlainObject = (value?: unknown): value is Record<string, unknown> =>
2+
value != null && Object.getPrototypeOf(value) === Object.prototype
33

44
export const merge = <T1 extends Record<string, unknown>, T2 extends Partial<T1> = Partial<T1>>(
55
defaults: T1,

0 commit comments

Comments
 (0)