Skip to content

Commit

Permalink
Only add default page search data if there is a response
Browse files Browse the repository at this point in the history
  • Loading branch information
gamma committed Aug 24, 2017
1 parent e141285 commit dcc1dc5
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions asyncsearch.js
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -67,10 +67,14 @@


/** Provider for the QuickPages Search **/ /** Provider for the QuickPages Search **/
jQuery.asyncsearch.addProvider( 'pagelookup', function( data ){ jQuery.asyncsearch.addProvider( 'pagelookup', function( data ){
jQuery('<div></div>').html(data).appendTo(this); if ( data.length > 0 ) {
jQuery('<div></div>').html(data).appendTo(this);
}
}); });


/** Provider for the Page Search **/ /** Provider for the Page Search **/
jQuery.asyncsearch.addProvider( 'pagesearch', function( data ){ jQuery.asyncsearch.addProvider( 'pagesearch', function( data ){
jQuery('<div></div>').html(data).appendTo(this); if ( data.length > 0 ) {
jQuery('<div></div>').html(data).appendTo(this);
}
}); });

0 comments on commit dcc1dc5

Please sign in to comment.