diff --git a/src/wp-includes/js/media-views.js b/src/wp-includes/js/media-views.js index 9e08201541..f9c5555049 100644 --- a/src/wp-includes/js/media-views.js +++ b/src/wp-includes/js/media-views.js @@ -3754,7 +3754,7 @@ AttachmentsBrowser = View.extend({ AttachmentView: wp.media.view.Attachment.Library }); - this.listenTo( this.controller, 'toggle:upload:attachment', _.bind( this.toggleUploader, this ) ); + this.controller.on( 'toggle:upload:attachment', this.toggleUploader, this ); this.controller.on( 'edit:selection', this.editSelection ); this.createToolbar(); if ( this.options.sidebar ) { diff --git a/src/wp-includes/js/media/views/attachments/browser.js b/src/wp-includes/js/media/views/attachments/browser.js index c97ebfb813..7ca001bb1f 100644 --- a/src/wp-includes/js/media/views/attachments/browser.js +++ b/src/wp-includes/js/media/views/attachments/browser.js @@ -38,7 +38,7 @@ AttachmentsBrowser = View.extend({ AttachmentView: wp.media.view.Attachment.Library }); - this.listenTo( this.controller, 'toggle:upload:attachment', _.bind( this.toggleUploader, this ) ); + this.controller.on( 'toggle:upload:attachment', this.toggleUploader, this ); this.controller.on( 'edit:selection', this.editSelection ); this.createToolbar(); if ( this.options.sidebar ) {