aboutsummaryrefslogtreecommitdiffstats
path: root/lib/util.js
diff options
context:
space:
mode:
authorMatěj Cepl <mcepl@redhat.com>2010-06-03 00:03:35 +0200
committerMatěj Cepl <mcepl@redhat.com>2010-06-03 00:03:35 +0200
commit17db206e5794f553fe25433d53f4ace4094412c0 (patch)
treeb563ac666348cd59bc3b9e93c77ff28fd5ebcc9b /lib/util.js
parent8c4861feb05849f58a6ae60bc6c5c8e0c9432f54 (diff)
downloadbugzilla-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.js5
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];
};
/**