From 20cbf7115e53dab5163970c10af7b3c9dfcdb77d Mon Sep 17 00:00:00 2001 From: Christopher Haas Date: Wed, 12 Aug 2020 15:22:13 -0400 Subject: [PATCH] Changed .size() function to .length .size() is deprecated so I changed it to .length instead. Solved a bug in my app, hope this helps. --- app/assets/javascripts/jquery.infinite-pages.js.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/assets/javascripts/jquery.infinite-pages.js.coffee b/app/assets/javascripts/jquery.infinite-pages.js.coffee index 74efbfd..a1a4f4d 100644 --- a/app/assets/javascripts/jquery.infinite-pages.js.coffee +++ b/app/assets/javascripts/jquery.infinite-pages.js.coffee @@ -58,7 +58,7 @@ Released under the MIT License # load event if close enough check: -> nav = @$container.find(@options.navSelector) - if nav.size() == 0 + if nav.length == 0 @_log "No more pages to load" else windowBottom = @$context.scrollTop() + @$context.height()