mirror of
git://develop.git.wordpress.org/
synced 2025-03-20 20:09:53 +01:00
Media: Featured image modal loads only selected image when infinite scroll is disabled.
Follow-up to [52167], which partially fixed a bug introduced in [50829] that caused media modal to only load the selected image. This commit adds additional checks to ensure infinite scroll is disabled. Follow-up to [50829], [52167]. Props dariak, joedolson, szaqal21. Fixes #53765. git-svn-id: https://develop.svn.wordpress.org/trunk@52287 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
e0e5eb53d4
commit
aaded1d17e
@ -117,7 +117,7 @@ FeaturedImage = Library.extend(/** @lends wp.media.controller.FeaturedImage.prot
|
||||
|
||||
selection.reset( attachment ? [ attachment ] : [] );
|
||||
|
||||
if ( library.hasMore() ) {
|
||||
if ( ! infinite_scrolling && library.hasMore() ) {
|
||||
library.more();
|
||||
}
|
||||
}
|
||||
|
@ -104,7 +104,7 @@ ReplaceImage = Library.extend(/** @lends wp.media.controller.ReplaceImage.protot
|
||||
|
||||
selection.reset( attachment ? [ attachment ] : [] );
|
||||
|
||||
if ( library.hasMore() ) {
|
||||
if ( ! infinite_scrolling && library.getTotalAttachments() == 0 && library.hasMore() ) {
|
||||
library.more();
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user