aboutsummaryrefslogtreecommitdiff
path: root/src/utility.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/utility.js')
-rw-r--r--src/utility.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/utility.js b/src/utility.js
index 42c6ca69..5ae4480f 100644
--- a/src/utility.js
+++ b/src/utility.js
@@ -185,7 +185,7 @@ function mergeInto(obj, other) {
}
function isNumber(x) {
- return x == parseFloat(x); // XXX add: || x.match(/^-?\d+(\.\d+)?/);
+ return x == parseFloat(x) || (typeof x == 'string' && x.match(/^-?\d+/));
}
function isArray(x) {