diff --git a/src/wp-includes/media-template.php b/src/wp-includes/media-template.php
index d0869c0af4..7ef4f041e3 100644
--- a/src/wp-includes/media-template.php
+++ b/src/wp-includes/media-template.php
@@ -1008,7 +1008,7 @@ function wp_print_media_templates() {
<# } #>
- <# if ( attachment.caption.trim() ) { #>
+ <# if ( attachment.caption ) { #>