WordPress.org

Make WordPress Core

Ticket #24409: 24409-08.patch

File 24409-08.patch, 464 bytes (added by gcorne, 6 years ago)
  • src/wp-includes/js/media-models.js

    diff --git src/wp-includes/js/media-models.js src/wp-includes/js/media-models.js
    index 86d31b7..19e9021 100644
    window.wp = window.wp || {}; 
    448448                        }
    449449
    450450                        size = this.attachment.get( 'sizes' )[ this.get( 'size' ) ];
     451
     452                        if ( ! size ) {
     453                                return;
     454                        }
     455
    451456                        this.set( 'url', size.url );
    452457                        this.set( 'width', size.width );
    453458                        this.set( 'height', size.height );