Fix pasting same image multiple times [SCI-7803]

This commit is contained in:
Martin Artnik 2023-01-24 11:52:20 +01:00
parent 07f2b83f81
commit 0a768fbfa3

View file

@ -28,7 +28,7 @@ class TinyMceAsset < ApplicationRecord
.scan(/data-mce-token="([^"]+)"/)
.flatten
images = JSON.parse(images) | text_images
images = JSON.parse(images) + text_images
current_images = object.tiny_mce_assets.pluck(:id)
images_to_delete = current_images.reject do |x|