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

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

Built from https://develop.svn.wordpress.org/trunk@42222


git-svn-id: http://core.svn.wordpress.org/trunk@42051 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Weston Ruter 2017-11-23 19:29:46 +00:00
parent 8c7bb9009c
commit e0b4933fdb
3 changed files with 5 additions and 5 deletions

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() {

File diff suppressed because one or more lines are too long

View File

@ -4,7 +4,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '5.0-alpha-42220'; $wp_version = '5.0-alpha-42222';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.