diff --git src/wp-includes/js/media-views.js src/wp-includes/js/media-views.js
index 7ea9ed3cb6..29b56c66a8 100644
|
|
|
UploaderInline = View.extend({ |
| 8228 | 8228 | }, |
| 8229 | 8229 | show: function() { |
| 8230 | 8230 | this.$el.removeClass( 'hidden' ); |
| 8231 | | if ( this.controller.$uploaderToggler.length ) { |
| | 8231 | if ( this.controller.$uploaderToggler && this.controller.$uploaderToggler.length ) { |
| 8232 | 8232 | this.controller.$uploaderToggler.attr( 'aria-expanded', 'true' ); |
| 8233 | 8233 | } |
| 8234 | 8234 | }, |
| 8235 | 8235 | hide: function() { |
| 8236 | 8236 | this.$el.addClass( 'hidden' ); |
| 8237 | | if ( this.controller.$uploaderToggler.length ) { |
| | 8237 | if ( this.controller.$uploaderToggler && this.controller.$uploaderToggler.length ) { |
| 8238 | 8238 | this.controller.$uploaderToggler |
| 8239 | 8239 | .attr( 'aria-expanded', 'false' ) |
| 8240 | 8240 | // Move focus back to the toggle button when closing the uploader. |
diff --git src/wp-includes/js/media/views/uploader/inline.js src/wp-includes/js/media/views/uploader/inline.js
index f6be006b6b..dfb208f851 100644
|
|
|
UploaderInline = View.extend({ |
| 119 | 119 | }, |
| 120 | 120 | show: function() { |
| 121 | 121 | this.$el.removeClass( 'hidden' ); |
| 122 | | if ( this.controller.$uploaderToggler.length ) { |
| | 122 | if ( this.controller.$uploaderToggler && this.controller.$uploaderToggler.length ) { |
| 123 | 123 | this.controller.$uploaderToggler.attr( 'aria-expanded', 'true' ); |
| 124 | 124 | } |
| 125 | 125 | }, |
| 126 | 126 | hide: function() { |
| 127 | 127 | this.$el.addClass( 'hidden' ); |
| 128 | | if ( this.controller.$uploaderToggler.length ) { |
| | 128 | if ( this.controller.$uploaderToggler && this.controller.$uploaderToggler.length ) { |
| 129 | 129 | this.controller.$uploaderToggler |
| 130 | 130 | .attr( 'aria-expanded', 'false' ) |
| 131 | 131 | // Move focus back to the toggle button when closing the uploader. |