From 8009f552a245386f0cecaf3e43cf8d73123519ee Mon Sep 17 00:00:00 2001 From: Joe Dolson Date: Fri, 4 Feb 2022 00:58:13 +0000 Subject: [PATCH] Comments: Verify 'mirroring' property exists in media views. Checks that the media collection has a mirroring property before accessing the property in media views. Props MMDeveloper, mukesh27. Fixes #53856. git-svn-id: https://develop.svn.wordpress.org/trunk@52671 602fd350-edb4-49c9-b593-d223f7449a82 --- src/js/media/views/attachments/browser.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/media/views/attachments/browser.js b/src/js/media/views/attachments/browser.js index eace0eec9e..7f40140fc5 100644 --- a/src/js/media/views/attachments/browser.js +++ b/src/js/media/views/attachments/browser.js @@ -130,7 +130,7 @@ AttachmentsBrowser = View.extend(/** @lends wp.media.view.AttachmentsBrowser.pro mediaFoundHasMoreResultsMessage = __( 'Number of media items displayed: %d. Scroll the page for more results.' ); } - if ( this.collection.mirroring.args.s ) { + if ( this.collection.hasOwnProperty('mirroring') && this.collection.mirroring.args.s ) { count = this.collection.length; if ( 0 === count ) {