From f0d32a4546e66cc6e7ef3905e7e41d7f2263bb99 Mon Sep 17 00:00:00 2001 From: Code Hz Date: Sat, 28 Jan 2023 16:03:24 +0800 Subject: [PATCH] fix(ui): use String.prototype.replace to make it compatible with legacy version browsers (#3000) --- packages/ui/src/components/Input/PhoneInput.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/ui/src/components/Input/PhoneInput.tsx b/packages/ui/src/components/Input/PhoneInput.tsx index 836481e82..fa7fed594 100644 --- a/packages/ui/src/components/Input/PhoneInput.tsx +++ b/packages/ui/src/components/Input/PhoneInput.tsx @@ -91,7 +91,7 @@ const PhoneInput = ({ setOnFocus(false); }} onChange={({ target: { value } }) => { - onChange({ nationalNumber: value.replaceAll(/\D/g, '') }); + onChange({ nationalNumber: value.replace(/\D/g, '') }); }} /> {nationalNumber && onFocus && (