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: https://develop.svn.wordpress.org/trunk@22976 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin 2012-12-02 21:53:45 +00:00
parent 30066d6553
commit 8cd2af059b
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 ) { #>