diff --git a/src/wp-includes/media-template.php b/src/wp-includes/media-template.php
index b41357185f..73e2fabb4e 100644
--- a/src/wp-includes/media-template.php
+++ b/src/wp-includes/media-template.php
@@ -446,17 +446,15 @@ function wp_print_media_templates() {
#>
<#
if ( 'uploadedTo' === field ) {
- if ( data[field] ) {
- #><#
+ if ( data[ field ] ) {
+ #>{{ data.uploadedToTitle }}<#
} else {
#><#
}
} else if ( 'title' === field && ! data[ field ] ) {
#><#
- }
-
- if ( data[ field ] ) {
- #>{{ data[ field ] }}<#
+ } else if ( data[ field ] ) {
+ #>{{ data[ field ] }}<#
}
#>
<# }); #>