Media templates: Make sure we have a width and height before printing dimensions. We don't calculate dimensions for icons. fixes #22680.

git-svn-id: http://core.svn.wordpress.org/trunk@22976 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Nacin 2012-12-02 21:53:45 +00:00
parent 904306e1ce
commit 36dedb38d1
1 changed files with 1 additions and 1 deletions

View File

@ -1662,7 +1662,7 @@ function wp_print_media_templates() {
<div class="details">
<div class="filename">{{ data.filename }}</div>
<div class="uploaded">{{ data.dateFormatted }}</div>
<# if ( 'image' === data.type && ! data.uploading ) { #>
<# if ( 'image' === data.type && ! data.uploading && data.width && data.height ) { #>
<div class="dimensions">{{ data.width }} &times; {{ data.height }}</div>
<# } #>
<# if ( ! data.uploading ) { #>