Skip to content

Commit

Permalink
Allow numeric values with leading '+' and/or with exponent parts.
Browse files Browse the repository at this point in the history
Fixes #551
  • Loading branch information
arilotter committed Mar 6, 2019
1 parent 875a3d6 commit 091cb42
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -625,7 +625,7 @@ function getPathProgress(path, progress) {
// Decompose value

function decomposeValue(val, unit) {
const rgx = /-?\d*\.?\d+/g;
const rgx = /[-+]?\d*\.?\d+([eE][-+]?\d+)?/g;
const value = validateValue((is.pth(val) ? val.totalLength : val), unit) + '';
return {
original: value,
Expand Down

0 comments on commit 091cb42

Please sign in to comment.