Skip to content

Commit 7866419

Browse files
committed
fix: forwardRef should ignore empty
1 parent 9a9bf0e commit 7866419

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Selector/Input.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ interface InputProps {
2121
function fillRef(node: InputRef, ref: React.LegacyRef<InputRef> | React.Ref<InputRef>) {
2222
if (typeof ref === 'function') {
2323
ref(node);
24-
} else if (typeof ref === 'object') {
24+
} else if (ref && typeof ref === 'object') {
2525
(ref as any).current = node;
2626
}
2727
}

0 commit comments

Comments
 (0)