Themes: Only show author names during a search if it matches 3 or more characters.

props matveb.
fixes #26422.


git-svn-id: https://develop.svn.wordpress.org/trunk@26686 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin
2013-12-05 19:56:16 +00:00
parent dc7082fbc7
commit e98d56fab4
+1 -1
View File
@@ -146,7 +146,7 @@ themes.Collection = Backbone.Collection.extend({
results = this.filter( function( data ) {
haystack = _.union( data.get( 'name' ), data.get( 'description' ), data.get( 'author' ), data.get( 'tags' ) );
if ( match.test( data.get( 'author' ) ) ) {
if ( match.test( data.get( 'author' ) ) && term.length > 2 ) {
data.set( 'displayAuthor', true );
}