From e29dc811f7c9fedb47726fcf5a4cc7e991701deb Mon Sep 17 00:00:00 2001 From: Mark Jaquith Date: Wed, 17 Apr 2013 17:57:51 +0000 Subject: [PATCH] Use attachment.url only if it is available, else fall back to props.url. see #24046. see [24009]. git-svn-id: https://develop.svn.wordpress.org/trunk@24017 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/js/media-editor.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-includes/js/media-editor.js b/wp-includes/js/media-editor.js index e3c7e4d8d7..96a6f1cac1 100644 --- a/wp-includes/js/media-editor.js +++ b/wp-includes/js/media-editor.js @@ -191,7 +191,7 @@ props = wp.media.string.props( props, attachment ); classes = props.classes || []; - img.src = props.url; + img.src = typeof attachment !== 'undefined' ? attachment.url : props.url; _.extend( img, _.pick( props, 'width', 'height', 'alt' ) ); // Only assign the align class to the image if we're not printing