0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2024-12-30 20:33:54 -05:00

fix(ui): use String.prototype.replace to make it compatible with legacy version browsers (#3000)

This commit is contained in:
Code Hz 2023-01-28 16:03:24 +08:00 committed by GitHub
parent b5e7350ee9
commit f0d32a4546
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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 && (