@@ -121,7 +121,7 @@ define(function (require, exports, module) {
121121 * if the path does not match any of the globs. If filtering many paths at once, use filterFileList()
122122 * for much better performance.
123123 *
124- * @param {! string } compiledFilter 'Compiled' filter object as returned by compile()
124+ * @param {? string } compiledFilter 'Compiled' filter object as returned by compile(), or null to no-op
125125 * @param {!string } fullPath
126126 * @return {boolean }
127127 */
@@ -137,7 +137,7 @@ define(function (require, exports, module) {
137137 /**
138138 * Returns a copy of 'files' filtered to just those that don't match any of the exclusion globs in the filter.
139139 *
140- * @param {! string } compiledFilter 'Compiled' filter object as returned by compile()
140+ * @param {? string } compiledFilter 'Compiled' filter object as returned by compile(), or null to no-op
141141 * @param {!Array.<File> } files
142142 * @return {!Array.<File> }
143143 */
@@ -200,7 +200,7 @@ define(function (require, exports, module) {
200200 context . promise . done ( function ( files ) {
201201 var filter = getValue ( ) ;
202202 if ( filter . length ) {
203- var filtered = filterFileList ( compile ( getValue ( ) ) , files ) ;
203+ var filtered = filterFileList ( compile ( filter ) , files ) ;
204204 $fileCount . html ( StringUtils . format ( Strings . FILTER_FILE_COUNT , filtered . length , files . length , context . label ) ) ;
205205 } else {
206206 $fileCount . html ( StringUtils . format ( Strings . FILTER_FILE_COUNT_ALL , files . length , context . label ) ) ;
@@ -239,7 +239,7 @@ define(function (require, exports, module) {
239239 * @param {?{label:string, promise:$.Promise} } context Info on files filter will apply to - see editFilter()
240240 * @return {!jQueryObject } Picker UI. To retrieve the selected value, use commitPicker().
241241 */
242- function createFilterPicker ( contextPromise ) {
242+ function createFilterPicker ( context ) {
243243 var $picker = $ ( "<div class='filter-picker'><span class='filter-label'></span><button class='btn no-focus'></button></div>" ) ,
244244 $button = $picker . find ( "button" ) ;
245245
@@ -275,7 +275,7 @@ define(function (require, exports, module) {
275275 updatePicker ( ) ;
276276
277277 $button . click ( function ( ) {
278- editFilter ( getLastFilter ( ) , contextPromise )
278+ editFilter ( getLastFilter ( ) , context )
279279 . done ( function ( buttonId ) {
280280 if ( buttonId === Dialogs . DIALOG_BTN_OK ) {
281281 updatePicker ( ) ;
0 commit comments