diff --git a/src/shifty.token.js b/src/shifty.token.js index 4b799d39..674cd8c6 100644 --- a/src/shifty.token.js +++ b/src/shifty.token.js @@ -201,7 +201,7 @@ } else if (chunks.length === 1 || // ...or if the string starts with a number component (".", "-", or a // digit)... - formattedString[0].match(R_NUMBER_COMPONENT)) { + formattedString.charAt(0).match(R_NUMBER_COMPONENT)) { // ...prepend an empty string here to make sure that the formatted number // is properly replaced by VALUE_PLACEHOLDER chunks.unshift(''); diff --git a/tests/index.html b/tests/index.html index dac9d18f..e5dfb357 100644 --- a/tests/index.html +++ b/tests/index.html @@ -29,7 +29,9 @@