From 61b6bad83b930dd5c95b4f0b3be37fe0a7d211e9 Mon Sep 17 00:00:00 2001 From: Andrew Thornton Date: Sat, 1 Aug 2020 20:20:52 +0100 Subject: [PATCH 1/2] Prevent empty div when editing comment The template for attachments needs to remove whitespace and return empty when there are no attachments. Fix #10220 Signed-off-by: Andrew Thornton --- templates/repo/issue/view_content/attachments.tmpl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/repo/issue/view_content/attachments.tmpl b/templates/repo/issue/view_content/attachments.tmpl index 2d3c63817973f..3c69dbc2bae0b 100644 --- a/templates/repo/issue/view_content/attachments.tmpl +++ b/templates/repo/issue/view_content/attachments.tmpl @@ -1,4 +1,4 @@ -{{range .Attachments}} +{{- range .Attachments -}}