Skip to content

Commit b829b4f

Browse files
ggovanoriondean
authored andcommitted
fix: disallow pasting of numbers that would be Infinity
1 parent abfa441 commit b829b4f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/helpers.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ exports.formattedToRaw = function(formattedValue, options) {
200200
}
201201

202202
exports.rawToFormatted = function (rawValue, options) {
203-
if (is.not.number(rawValue)) return '';
203+
if (is.not.number(rawValue) || is.not.finite(rawValue)) return '';
204204

205205
let stringValue = String(rawValue);
206206

0 commit comments

Comments
 (0)