diff options
author | Matěj Cepl <mcepl@redhat.com> | 2011-05-04 17:50:28 +0200 |
---|---|---|
committer | Matěj Cepl <mcepl@redhat.com> | 2011-06-05 14:51:41 +0200 |
commit | 4fea7aeaf6dc6f3687662882782658ed4b31e7e3 (patch) | |
tree | dbc3eecbf2b15d70657c930323a43ec9cef92812 /data/lib/util.js | |
parent | 0b92c971cd6887ff7386c0e2a7577440429d47f6 (diff) | |
download | bugzilla-triage-4fea7aeaf6dc6f3687662882782658ed4b31e7e3.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 064887c..dc927b6 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); }); |