diff options
author | Matěj Cepl <mcepl@redhat.com> | 2011-05-04 17:50:28 +0200 |
---|---|---|
committer | Matěj Cepl <mcepl@redhat.com> | 2011-05-04 17:50:28 +0200 |
commit | 0d90391317f597d66e6f51520eaf012a6ff3ad10 (patch) | |
tree | 815d01410cf9af33a30afa0748ffce5ab6fdb0f9 /data/lib/util.js | |
parent | a83151a1567367bb99014100e890e89681ff206f (diff) | |
download | bugzilla-triage-0d90391317f597d66e6f51520eaf012a6ff3ad10.tar.gz |
Make filterByRegexp more tolerant to different configurations.
* filterByRegexp shouldn’t crash when list is undefined
* also be more tolerant for nonexistent some RH-specific functions
Fixes #91.
Diffstat (limited to 'data/lib/util.js')
-rw-r--r-- | data/lib/util.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/data/lib/util.js b/data/lib/util.js index abf8824..6ed131e 100644 --- a/data/lib/util.js +++ b/data/lib/util.js @@ -294,7 +294,7 @@ function removeCSVValue(str, value) { */ function filterByRegexp(list, chosingMark) { var chosenPair = []; - if (list.length > 0) { + if (list && list.length > 0) { chosenPair = list.filter(function (pair) { return new RegExp(pair.regexp, "i").test(chosingMark); }); |