Skip to content

Commit

Permalink
fix(profile): scrollIntoView not found
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnsonMao committed Dec 21, 2024
1 parent 0956a4a commit f9a0a67
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions components/Profile/Edit/useEditProfile.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,9 @@ const useEditProfile = () => {
isFocus = true;

if (['INPUT', 'TEXTAREA'].includes(element.tagName)) {
element.focus();
element?.focus?.();
} else {
element.scrollIntoView({ block: 'center' });
element?.scrollIntoView?.({ block: 'center' });
}
}
return [err.path[0], err.message];
Expand Down

0 comments on commit f9a0a67

Please sign in to comment.