From 6097b886f7328474c60257c3bf97b6d7fc81823b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Gaya?= <sebastien.gaya@gmail.com> Date: Thu, 29 Jun 2023 12:25:16 +0200 Subject: [PATCH] [skip ci] hotfix image snippet without image --- .../blocks/templates/image/_snippet.html.erb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/views/admin/communication/blocks/templates/image/_snippet.html.erb b/app/views/admin/communication/blocks/templates/image/_snippet.html.erb index 4394cb02c..67a949f5d 100644 --- a/app/views/admin/communication/blocks/templates/image/_snippet.html.erb +++ b/app/views/admin/communication/blocks/templates/image/_snippet.html.erb @@ -1,6 +1,6 @@ -<% -blob = block.template.image_component.blob -object = blob.variable? ? blob.variant(resize: 'x180') - : blob +<% +blob = block.template.image_component.blob +object = blob&.variable? ? blob.variant(resize: 'x180') + : blob %> -<%= image_tag object, height: 90, alt: '', class: 'me-2' if blob %> +<%= image_tag object, height: 90, alt: '', class: 'me-2' if object %> -- GitLab