From 07170b926701662d37a72d1ede150b35cbafc05a Mon Sep 17 00:00:00 2001 From: alexisben <alexiben7@gmail.com> Date: Fri, 6 May 2022 18:07:08 +0200 Subject: [PATCH] wip --- app/views/admin/communication/unsplash/_selector.html.erb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/views/admin/communication/unsplash/_selector.html.erb b/app/views/admin/communication/unsplash/_selector.html.erb index 55ea99667..fe41fc495 100644 --- a/app/views/admin/communication/unsplash/_selector.html.erb +++ b/app/views/admin/communication/unsplash/_selector.html.erb @@ -172,11 +172,12 @@ path = admin_communication_unsplash_path(website_id: nil, format: :json) this.selected = image; - if (!inputImage) ( + if (!inputImage) { inputImage = document.createElement('img'); // add img-fluid img-thumb - inputImageContainer.append(img); - ) + inputImageContainer.appendChild(img); + } + if (inputImage) { inputImage.setAttribute('src', image.preview); } -- GitLab