Skip to content

Commit

Permalink
fix for javascript/turbolink nav.render firing when element not found (
Browse files Browse the repository at this point in the history
  • Loading branch information
ddnexus committed Jul 2, 2019
1 parent 9addfa3 commit c699fe5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/javascripts/pagy.js
Expand Up @@ -22,6 +22,7 @@ Pagy.nav = function(id, tags, sequels, param){
widths.sort(function(a, b){return b-a});

var render = function(){
if (document.getElementById(id) === null){ return }
if (container.clientWidth === 0) { rendering() }
var width, i, len;
for (i = 0, len = widths.length; i < len; i++) {
Expand Down

0 comments on commit c699fe5

Please sign in to comment.