Skip to content

Commit 1a9a4f5

Browse files
committed
chore: Pick works with null and undefined
1 parent fedd8f3 commit 1a9a4f5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/nodes/Object.Pick.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ type P = {
88
type R = unknown;
99

1010
export const module: ModuleDefinition<P, R> = {
11-
version: '1.4.5',
11+
version: '1.4.6',
1212
moduleName: 'Object / Pick',
1313
description: `
1414
Picks specified keys from an object.
@@ -37,7 +37,7 @@ export const module: ModuleDefinition<P, R> = {
3737
};
3838

3939
export const compute: ModuleCompute<P, R> = params => {
40-
const object = typeof params.object === 'object' ? params.object : {};
40+
const object = typeof params.object === 'object' ? params.object ?? {} : {};
4141
const res: any = {};
4242
for (const key of params.keys) {
4343
const value = (object as any)[key];

0 commit comments

Comments
 (0)