We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9044327 commit 4ee6953Copy full SHA for 4ee6953
packages/format/src/se.ts
@@ -45,7 +45,10 @@ export function formatPhoneNumber(input: string): string {
45
}
46
47
const subscriberNumberFormat =
48
- SUBSCRIBER_NUMBER_FORMATS[subscriberNumber.length];
+ SUBSCRIBER_NUMBER_FORMATS[
49
+ // the cast should be okay here, as we've checked the length above
50
+ subscriberNumber.length as keyof typeof SUBSCRIBER_NUMBER_FORMATS
51
+ ];
52
53
const replacePattern = subscriberNumber.length === 5 ? '$1 $2' : '$1 $2 $3';
54
0 commit comments