Themes: Bail if the search term matches the currently rendered themes, Fixes the events being clobbered. Props jblz. Fixes #26347
git-svn-id: https://develop.svn.wordpress.org/trunk@26521 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
91b903fb6d
commit
63a4a1b10c
|
@ -97,6 +97,12 @@ themes.Collection = Backbone.Collection.extend({
|
|||
// and triggers an update event
|
||||
doSearch: function( value ) {
|
||||
|
||||
// Don't do anything if we've already done this search
|
||||
// Useful because the Search handler fires multiple times per keystroke
|
||||
if ( this.terms === value ) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Updates terms with the value passed
|
||||
this.terms = value;
|
||||
|
||||
|
|
Loading…
Reference in New Issue