lib/javascripts/pagy.js in pagy-5.6.3 vs lib/javascripts/pagy.js in pagy-5.6.4
- old
+ new
@@ -1,13 +1,13 @@
// See the Pagy documentation: https://ddnexus.github.io/pagy/extras#javascript
// This code should be OK also with very old browsers
-// Container of the whole pagy stuff
+// Container for the whole pagy stuff
function Pagy(){}
-Pagy.version = '5.6.3'
+Pagy.version = '5.6.4'
// Used by the waitForMe function
Pagy.delay = 100
// Scan the target for data-pagy-json elements and apply their functions
@@ -52,9 +52,10 @@
else if (typeof(item) === 'number') { html += fill(tags.link, item, label) }
else if (item === 'gap') { html += tags.gap }
else if (typeof(item) === 'string') { html += fill(tags.active, item, label) }
}
html += tags.after
+ this.innerHTML = ''
this.insertAdjacentHTML('afterbegin', html)
lastWidth = width
}
}.bind(pagyEl)
pagyEl.render()