mirror of
https://github.com/WordPress/WordPress.git
synced 2025-03-09 07:00:01 +00:00
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. Built from https://develop.svn.wordpress.org/trunk@51440 git-svn-id: http://core.svn.wordpress.org/trunk@51051 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
1c4ec82ce7
commit
f0e5f17c2c
@ -2074,7 +2074,10 @@ AttachmentsBrowser = View.extend(/** @lends wp.media.view.AttachmentsBrowser.pro
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.updateContent();
|
this.updateContent();
|
||||||
this.updateLoadMoreView();
|
|
||||||
|
if ( ! infiniteScrolling ) {
|
||||||
|
this.updateLoadMoreView();
|
||||||
|
}
|
||||||
|
|
||||||
if ( ! this.options.sidebar || 'errors' === this.options.sidebar ) {
|
if ( ! this.options.sidebar || 'errors' === this.options.sidebar ) {
|
||||||
this.$el.addClass( 'hide-sidebar' );
|
this.$el.addClass( 'hide-sidebar' );
|
||||||
|
2
wp-includes/js/media-views.min.js
vendored
2
wp-includes/js/media-views.min.js
vendored
File diff suppressed because one or more lines are too long
@ -13,7 +13,7 @@
|
|||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '5.9-alpha-51438';
|
$wp_version = '5.9-alpha-51440';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user