diff --git a/core/http/views/chat.html b/core/http/views/chat.html
index b9a40687..3486e101 100644
--- a/core/http/views/chat.html
+++ b/core/http/views/chat.html
@@ -229,8 +229,10 @@ SOFTWARE.
{{ if $model }}
{{ $galleryConfig:= index $allGalleryConfigs $model}}
+ {{ if $galleryConfig }}
{{ if $galleryConfig.Icon }}{{end}}
{{ end }}
+ {{ end }}