From 01afa69d709596c911e8b829a8053f5c62c59a99 Mon Sep 17 00:00:00 2001 From: Claudio Date: Fri, 11 Oct 2024 12:38:56 +0200 Subject: [PATCH] Fix lint issue in PhoneNumberInput.tsx --- .../components/PhoneNumberInput/PhoneNumberInput.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/circuit-ui/components/PhoneNumberInput/PhoneNumberInput.tsx b/packages/circuit-ui/components/PhoneNumberInput/PhoneNumberInput.tsx index 5c96079ce2..506fc763ec 100644 --- a/packages/circuit-ui/components/PhoneNumberInput/PhoneNumberInput.tsx +++ b/packages/circuit-ui/components/PhoneNumberInput/PhoneNumberInput.tsx @@ -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; @@ -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) {