Make WordPress Core

Changeset 51441


Ignore:
Timestamp:
07/15/2021 05:28:27 PM (5 years ago)
Author:
desrosj
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, joedolson.
Merges [51440] to the 5.8 branch.
Fixes #53672.

Location:
branches/5.8
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/5.8

  • branches/5.8/src/js/media/views/attachments/browser.js

    r51145 r51441  
    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.