Skip to content

Commit

Permalink
no need to check allowClear for truthyness
Browse files Browse the repository at this point in the history
  • Loading branch information
bartpio committed Aug 4, 2023
1 parent 1a670a9 commit 8c66709
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/date-picker/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -174,5 +174,5 @@ export function mergeAllowClear(
}

const defaults = { clearIcon: clearIcon ?? defaultClearIcon };
return typeof allowClear === 'object' && allowClear ? { ...defaults, ...allowClear } : defaults;
return typeof allowClear === 'object' ? { ...defaults, ...allowClear } : defaults;
}

0 comments on commit 8c66709

Please sign in to comment.