From 53eaf9f0787168d39a1f9fe925cd04592a2fbd32 Mon Sep 17 00:00:00 2001 From: Weston Ruter Date: Thu, 23 Nov 2017 19:28:33 +0000 Subject: [PATCH] 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 --- src/wp-admin/js/theme.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/wp-admin/js/theme.js b/src/wp-admin/js/theme.js index 41fd4e6653..44cc0f15f5 100644 --- a/src/wp-admin/js/theme.js +++ b/src/wp-admin/js/theme.js @@ -102,7 +102,7 @@ themes.view.Appearance = wp.Backbone.View.extend({ collection: self.collection, parent: this }); - self.searchView = view; + self.SearchView = view; // Render and append after screen title view.render(); @@ -1448,7 +1448,7 @@ themes.Run = { this.render(); // 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() { @@ -1924,7 +1924,7 @@ themes.RunInstaller = { this.render(); // 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() {