Skip to content

Commit

Permalink
Fix lint issue in PhoneNumberInput.tsx
Browse files Browse the repository at this point in the history
  • Loading branch information
roma-claudio committed Oct 11, 2024
1 parent ee8259d commit 01afa69
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -245,8 +245,9 @@ export const PhoneNumberInput = forwardRef<
if (!selectedCountry) {
return;
}
const code = countryCode.options
.find(({ country }) => country === selectedCountry)?.code;
const code = countryCode.options.find(
({ country }) => country === selectedCountry,
)?.code;

if (!code) {
return;
Expand Down Expand Up @@ -286,7 +287,7 @@ export const PhoneNumberInput = forwardRef<

const pastedOption = countryCode.options
// Match longer, more specific country codes first
.sort((a, b) => b.code.length - a.code.length)
.sort((a, b) => b.code.length - a.code.length)
.find(({ code }) => pastedText.startsWith(code));

if (!pastedOption) {
Expand Down

0 comments on commit 01afa69

Please sign in to comment.