Jetpack by WordPress.com
[resolved] Checking for infinite scroll JS variables (4 posts)

  1. Jono Warren
    Posted 2 years ago #

    When checking if the infinite scroll JavaScript variables are set you should check it is not undefined or is an object, rather than it's truthy-ness. Line 460 of infinity.js should become:

    if ( 'object' != typeof infiniteScroll ) return;

    I came across this when extracting the infinite scroll functionality for use in my own theme.


  2. Jeremy Herve
    Happiness Engineer
    Plugin Author

    Posted 2 years ago #

    Thanks for the report. I opened a Trac ticket about it (#1732-plugins), and we will fix this problem in a future Jetpack release.

  3. Jeremy Herve
    Happiness Engineer
    Plugin Author

    Posted 1 year ago #

    We have just committed your patch, and it will be included in the next Jetpack release.
    Thanks again for the report!

  4. Jono Warren
    Posted 1 year ago #

    No problem, thanks for getting back to me.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Jetpack by WordPress.com
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic