mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 09:37:42 +01:00
Media manager: Avoid a blank modal when an invalid image size class is set on the image.
props gcorne. fixes #24409. Built from https://develop.svn.wordpress.org/trunk@27687 git-svn-id: http://core.svn.wordpress.org/trunk@27526 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
a6b9d323c6
commit
c4aab42b4b
@ -448,6 +448,11 @@ window.wp = window.wp || {};
|
||||
}
|
||||
|
||||
size = this.attachment.get( 'sizes' )[ this.get( 'size' ) ];
|
||||
|
||||
if ( ! size ) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.set( 'url', size.url );
|
||||
this.set( 'width', size.width );
|
||||
this.set( 'height', size.height );
|
||||
|
2
wp-includes/js/media-models.min.js
vendored
2
wp-includes/js/media-models.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user