From 091cb4249b59605c41b06b84678491085c1f26ff Mon Sep 17 00:00:00 2001 From: Ari Lotter Date: Wed, 6 Mar 2019 13:54:46 -0500 Subject: [PATCH] Allow numeric values with leading '+' and/or with exponent parts. Fixes #551 --- src/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index 7caf091c..a661b543 100644 --- a/src/index.js +++ b/src/index.js @@ -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,