Skip to content

Commit f3bdeef

Browse files
elioriverojeherve
authored andcommitted
Plugin search hints: fix console warning when loading the plugin thickbox (#11471)
This PR fixes an issue when the title of a plugin–not the hint card title–is clicked and the Thickbox with more info is loaded. Previously it was throwing an error on console and it's been fixed now. ![error](https://user-images.githubusercontent.com/1041600/53754636-52b1a800-3e93-11e9-835b-518f5d987f84.png) #### Testing instructions: Keep the JS console open WP Admin > Plugins > Add New Do a plugin search that triggers a hint, like `publicize` Click the title of other plugins returned by search The error above shouldn't be displayed in console
1 parent 9f26de4 commit f3bdeef

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

modules/plugin-search/plugin-search.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,10 @@ var JetpackPSH = {};
159159
* Start suggesting.
160160
*/
161161
init: function() {
162+
if ( JetpackPSH.$pluginFilter.length < 1 ) {
163+
return;
164+
}
165+
162166
// Replace PSH bottom row on page load
163167
JetpackPSH.replaceCardBottom();
164168

0 commit comments

Comments
 (0)