Skip to content

Commit

Permalink
Merge pull request #769 from projectblacklight/skip_turbolinks_precheck
Browse files Browse the repository at this point in the history
No need to check for Turbolinks defined.
  • Loading branch information
jcoyne committed Feb 11, 2014
2 parents ac434f2 + f700ae6 commit c6abd42
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions app/assets/javascripts/blacklight/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,12 @@ Blacklight = function() {
}
}();

if (typeof Turbolinks !== "undefined") {
$(document).on('page:load', function() {
Blacklight.activate();
});
}
// turbolinks triggers page:load events on page transition
// If app isn't using turbolinks, this event will never be triggered, no prob.
$(document).on('page:load', function() {
Blacklight.activate();
});

$(document).ready(function() {
Blacklight.activate();
});
Expand Down

0 comments on commit c6abd42

Please sign in to comment.