Make WordPress Core

Changeset 51440


Ignore:
Timestamp:
07/15/2021 04:59:26 PM (23 months ago)
Author:
joedolson
Message:

Media: Fix JS error in Media Library when infinite scroll enabled.

Wrap call to this.updateLoadMoreView() is wrapped in a check that infinite scroll is disabled to prevent JS errors.

Props wildworks.
Fixes #53672.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/js/media/views/attachments/browser.js

    r51145 r51440  
    8989
    9090        this.updateContent();
    91         this.updateLoadMoreView();
     91
     92        if ( ! infiniteScrolling ) {
     93            this.updateLoadMoreView();
     94        }
    9295
    9396        if ( ! this.options.sidebar || 'errors' === this.options.sidebar ) {
Note: See TracChangeset for help on using the changeset viewer.