Skip to content

Commit

Permalink
fix: replace .size() with .length
Browse files Browse the repository at this point in the history
As per: magoosh#27
  • Loading branch information
davegudge committed May 4, 2020
1 parent 9fb0076 commit 6a63eac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/assets/javascripts/jquery.infinite-pages.js.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ Released under the MIT License
# load event if close enough
check: ->
nav = @$container.find(@options.navSelector)
if nav.size() == 0
if (if typeof nav.size == 'function' then nav.size() else nav.length) == 0
@_log "No more pages to load"
else
windowBottom = @$context.scrollTop() + @$context.height()
Expand Down

0 comments on commit 6a63eac

Please sign in to comment.