Skip to content

Commit

Permalink
fix: disallow pasting of numbers that would be Infinity
Browse files Browse the repository at this point in the history
  • Loading branch information
ggovan authored and oriondean committed Jul 19, 2017
1 parent abfa441 commit b829b4f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ exports.formattedToRaw = function(formattedValue, options) {
}

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

let stringValue = String(rawValue);

Expand Down

0 comments on commit b829b4f

Please sign in to comment.