diff options
author | Matěj Cepl <mcepl@redhat.com> | 2010-06-03 00:03:35 +0200 |
---|---|---|
committer | Matěj Cepl <mcepl@redhat.com> | 2010-06-03 00:03:35 +0200 |
commit | 17db206e5794f553fe25433d53f4ace4094412c0 (patch) | |
tree | b563ac666348cd59bc3b9e93c77ff28fd5ebcc9b /lib/util.js | |
parent | 8c4861feb05849f58a6ae60bc6c5c8e0c9432f54 (diff) | |
download | bugzilla-triage-17db206e5794f553fe25433d53f4ace4094412c0.tar.gz |
With help of bugzilla (https://bugzilla.mozilla.org/show_bug.cgi?id=569273
and https://bugzilla.mozilla.org/show_bug.cgi?id=569271 I've got most
tests working.
Diffstat (limited to 'lib/util.js')
-rw-r--r-- | lib/util.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/util.js b/lib/util.js index dbadef8..b6691af 100644 --- a/lib/util.js +++ b/lib/util.js @@ -74,7 +74,10 @@ exports.getISODate = function getISODate(dateStr) { * the result will be untouched actual argument of the call. */ var valToArray = exports.valToArray = function valToArray(val) { - return (val instanceof Array) ? val : [val]; + var isArr = val && + val.constructor && + val.constructor.name === "Array"; + return isArr ? val : [val]; }; /** |