app/assets/javascripts/spina/admin/controllers/infinite_scroll_controller.js in spina-1.0.3 vs app/assets/javascripts/spina/admin/controllers/infinite_scroll_controller.js in spina-1.1.0
- old
+ new
@@ -12,11 +12,11 @@
$('#overlay section').off('scroll.infiniteScroll')
let $link = $(this.linkTarget)
// If the link has an actual href
- if ($link.attr('href').length > 0) {
+ if ($link.attr('href')) {
// If the window scrolls
$(window).on('scroll.infiniteScroll', this.loadNextPage($link))
// If the overlay scrolls
$('#overlay section').on('scroll.infiniteScroll', function() {
@@ -33,8 +33,8 @@
$('#overlay section').off('scroll.infiniteScroll')
$.rails.disableElement(link)
$.getScript(link.attr('href'))
}
}
-
+
})
})()