From 40f549d44f70a39b5a2fbf443aa9b08096b42410 Mon Sep 17 00:00:00 2001 From: HIRANO Satoshi Date: Tue, 16 May 2017 17:32:06 +0900 Subject: [PATCH] fix(uf()): remove all thousand seperators --- src/i18n.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/i18n.js b/src/i18n.js index 97cf7531..0c73e610 100644 --- a/src/i18n.js +++ b/src/i18n.js @@ -76,8 +76,8 @@ export class I18N { let thousandSeparator = comparer[1]; let decimalSeparator = comparer[5]; - // remove thousand seperator - let result = number.replace(thousandSeparator, '') + // remove all thousand seperators + let result = number.replace(new RegExp(thousandSeparator, 'g'), '') // remove non-numeric signs except -> , . .replace(/[^\d.,-]/g, '') // replace original decimalSeparator with english one