Media JS: Use correct reference to search term in the Attachments model search filter. see #21390.

git-svn-id: https://develop.svn.wordpress.org/trunk@22013 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Daryl Koopersmith 2012-09-26 15:13:22 +00:00
parent 0dd940e0c1
commit af4607a11e
1 changed files with 2 additions and 2 deletions

View File

@ -373,12 +373,12 @@ if ( typeof wp === 'undefined' )
// Note that this client-side searching is *not* equivalent
// to our server-side searching.
search: function( attachment ) {
if ( ! this.searching )
if ( ! this.props.get('search') )
return true;
return _.any(['title','filename','description','caption','name'], function( key ) {
var value = attachment.get( key );
return value && -1 !== value.search( this.searching );
return value && -1 !== value.search( this.props.get('search') );
}, this );
}
}