We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents baad3a1 + be82afc commit e8129bbCopy full SHA for e8129bb
src/number-format.js
@@ -44,7 +44,7 @@ export default function NumberFormat(config = options) {
44
45
this.toNumber = (string) => Number(string)
46
47
- this.numberOnly = (string, regExp) => string.toString().replace(regExp, '')
+ this.numberOnly = (string, regExp) => string?.toString().replace(regExp, '')
48
49
this.isNegative = this.sign() === '-'
50
0 commit comments