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

git-svn-id: http://core.svn.wordpress.org/trunk@22013 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Daryl Koopersmith 2012-09-26 15:13:22 +00:00
parent 67708a3d8b
commit 669b4b3a6d
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 );
}
}