Fix Safari Intl issue (#924)

This commit is contained in:
kwingram25 2019-04-08 03:45:41 -07:00 committed by Jaco Greeff
parent 521534be91
commit ba0d276ae3

View File

@ -46,10 +46,9 @@ type State = {
};
// Find decimal separator used in current locale
const getDecimalSeparator = (): string => Intl.NumberFormat()
.formatToParts(1.1)
.find(part => part.type === 'decimal')!
.value;
const getDecimalSeparator = (): string => 1.1
.toLocaleString()
.replace(/\d/g, '');
// note: KeyboardEvent.keyCode and KeyboardEvent.which are deprecated
const KEYS = {