Bug 923274 - Cannot open activity picker from input=file element on 1.2 most of the time, r=fabrice

This commit is contained in:
Andrea Marchesini 2013-11-21 12:50:50 +00:00
parent 3d3d26fb09
commit 76bf306a6e
2 changed files with 8 additions and 0 deletions

View File

@ -105,6 +105,10 @@ this.ActivitiesServiceFilter = {
continue;
}
if (Array.isArray(aValues[prop]) && aValues[prop].length == 0) {
continue;
}
// Otherwise, let's check the value against the filter.
if (!matchObject(aValues[prop], filtersMap[prop].filter)) {
return false;

View File

@ -150,4 +150,8 @@ function run_test() {
{a: { required: true, pattern: 'foobar'}}));
do_check_true(ActivitiesServiceFilter.match({a: 'FoOBaR'},
{a: { required: true, pattern: 'foobar', patternFlags: 'i'}}));
// Bug 923274
do_check_true(ActivitiesServiceFilter.match({a:[]}, {a:'a'}));
do_check_false(ActivitiesServiceFilter.match({a:[]}, {a: { required: true, value: 'a'}}));
}