Make WordPress Core

Changeset 27687


Ignore:
Timestamp:
03/24/2014 07:00:15 PM (11 years ago)
Author:
nacin
Message:

Media manager: Avoid a blank modal when an invalid image size class is set on the image.

props gcorne.
fixes #24409.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/js/media-models.js

    r27608 r27687  
    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 );
Note: See TracChangeset for help on using the changeset viewer.