Skip to content

Commit 2441cef

Browse files
committed
add comments
1 parent 9da4712 commit 2441cef

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

packages/bento-design-system/src/DateField/DateField.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ function RangeDateField(props: RangeDateFieldProps) {
119119
export type DateFieldProps = SingleDateFieldProps | RangeDateFieldProps;
120120

121121
export function DateField(props: DateFieldProps) {
122+
// Note: checking this case in the pattern matching below doesn't work for some reason
122123
if (props.type == null) {
123124
return <SingleDateField {...props} />;
124125
}

packages/bento-design-system/src/DateField/DateInput.tsx

+2-1
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,8 @@ function RangeDateInput(props: RangeDateInputProps) {
117117
export type DateInputProps = SingleDateInputProps | RangeDateInputProps;
118118

119119
export function DateInput(props: SingleDateInputProps | RangeDateInputProps) {
120-
if (props.type == undefined) {
120+
// Note: checking this case in the pattern matching below doesn't work for some reason
121+
if (props.type == null) {
121122
return <SingleDateInput {...props} />;
122123
}
123124
return match(props)

0 commit comments

Comments
 (0)