From 63bf25ec1f9e65d2b897b5c2b1402d3efe81cb7a Mon Sep 17 00:00:00 2001 From: Andrew Ozz Date: Fri, 4 Apr 2014 18:00:04 +0000 Subject: [PATCH] Edit image modal: check if full size exists before trying to use it for setting aspect ratio, props gcorne, see #27366 git-svn-id: https://develop.svn.wordpress.org/trunk@27948 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/js/media-models.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-includes/js/media-models.js b/src/wp-includes/js/media-models.js index 21b42b4e01..53eefdfe15 100644 --- a/src/wp-includes/js/media-models.js +++ b/src/wp-includes/js/media-models.js @@ -472,7 +472,7 @@ window.wp = window.wp || {}; setAspectRatio: function() { var full; - if ( this.attachment ) { + if ( this.attachment && this.attachment.get( 'sizes' ) ) { full = this.attachment.get( 'sizes' ).full; if ( full ) {