Skip to content

Commit

Permalink
Fix phone number clearing
Browse files Browse the repository at this point in the history
  • Loading branch information
xprnio committed Sep 4, 2023
1 parent 65fe4c1 commit 33102f1
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,10 @@ export function PhoneCellEdit({
const wrapperRef = useRef<HTMLDivElement | null>(null);

function handleSubmit() {
if (isPossiblePhoneNumber(internalValue ?? '')) {
if (
internalValue === undefined ||
isPossiblePhoneNumber(internalValue ?? '')
) {
onSubmit(internalValue ?? '');
}
}
Expand Down

0 comments on commit 33102f1

Please sign in to comment.