Themes: Prevent JS error on Themes admin screen when only one theme is installed.

Amends [42029].
Props chetan200891, afercia.
See #42348.
Fixes #42673.


git-svn-id: https://develop.svn.wordpress.org/trunk@42222 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Weston Ruter 2017-11-23 19:28:33 +00:00
parent a687253cce
commit 53eaf9f078

View File

@ -102,7 +102,7 @@ themes.view.Appearance = wp.Backbone.View.extend({
collection: self.collection, collection: self.collection,
parent: this parent: this
}); });
self.searchView = view; self.SearchView = view;
// Render and append after screen title // Render and append after screen title
view.render(); view.render();
@ -1448,7 +1448,7 @@ themes.Run = {
this.render(); this.render();
// Start debouncing user searches after Backbone.history.start(). // Start debouncing user searches after Backbone.history.start().
this.view.searchView.doSearch = _.debounce( this.view.searchView.doSearch, 500 ); this.view.SearchView.doSearch = _.debounce( this.view.SearchView.doSearch, 500 );
}, },
render: function() { render: function() {
@ -1924,7 +1924,7 @@ themes.RunInstaller = {
this.render(); this.render();
// Start debouncing user searches after Backbone.history.start(). // Start debouncing user searches after Backbone.history.start().
this.view.searchView.doSearch = _.debounce( this.view.searchView.doSearch, 500 ); this.view.SearchView.doSearch = _.debounce( this.view.SearchView.doSearch, 500 );
}, },
render: function() { render: function() {