Skip to content

Commit

Permalink
Prevent autocomplete from re-initializing multiple times
Browse files Browse the repository at this point in the history
  • Loading branch information
cbeer committed Oct 3, 2016
1 parent 4a2f660 commit af249d6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/assets/javascripts/blacklight/autocomplete.js
Expand Up @@ -5,6 +5,9 @@ Blacklight.onLoad(function() {

$('[data-autocomplete-enabled="true"]').each(function() {
var $el = $(this);
if($el.hasClass('tt-hint')) {
return;
}
var suggestUrl = $el.data().autocompletePath;

var terms = new Bloodhound({
Expand Down

0 comments on commit af249d6

Please sign in to comment.