We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ed902e8 commit 2a945a6Copy full SHA for 2a945a6
packages/std/src/merge/index.ts
@@ -1,5 +1,5 @@
1
-const isPlainObject = (value: unknown): value is Record<string, unknown> =>
2
- Object.getPrototypeOf(value) === Object.prototype
+const isPlainObject = (value?: unknown): value is Record<string, unknown> =>
+ value != null && Object.getPrototypeOf(value) === Object.prototype
3
4
export const merge = <T1 extends Record<string, unknown>, T2 extends Partial<T1> = Partial<T1>>(
5
defaults: T1,
0 commit comments