mirror of
https://github.com/WordPress/WordPress.git
synced 2024-11-13 06:07:23 +01: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, joedolson. Merges [51440] to the 5.8 branch. Fixes #53672. Built from https://develop.svn.wordpress.org/branches/5.8@51441 git-svn-id: http://core.svn.wordpress.org/branches/5.8@51052 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
94a93212ba
commit
41fca9e8ba
@ -2074,7 +2074,10 @@ AttachmentsBrowser = View.extend(/** @lends wp.media.view.AttachmentsBrowser.pro
|
||||
}
|
||||
|
||||
this.updateContent();
|
||||
this.updateLoadMoreView();
|
||||
|
||||
if ( ! infiniteScrolling ) {
|
||||
this.updateLoadMoreView();
|
||||
}
|
||||
|
||||
if ( ! this.options.sidebar || 'errors' === this.options.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
|
||||
*/
|
||||
$wp_version = '5.8-RC3-51439';
|
||||
$wp_version = '5.8-RC3-51441';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
Reference in New Issue
Block a user