WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. Jono Warren
    Member
    Posted 1 year 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.

    http://wordpress.org/extend/plugins/jetpack/

  2. Jeremy Herve
    Happiness Engineer
    Plugin Author

    Posted 1 year 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
    Member
    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

About this Topic