From bf0558d5dfb215474ebb33b423a3c6b9160a3b07 Mon Sep 17 00:00:00 2001 From: Martin Torrado Date: Thu, 29 Aug 2024 14:49:43 -0300 Subject: [PATCH] If an image is present in the selector-item section and a drag&drop action is performed on the same selector-item in the UI, the image gets duplicated. --- 07-tier-maker/index.html | 1 + 1 file changed, 1 insertion(+) diff --git a/07-tier-maker/index.html b/07-tier-maker/index.html index a602b04..fe5d4e4 100644 --- a/07-tier-maker/index.html +++ b/07-tier-maker/index.html @@ -240,6 +240,7 @@ sourceContainer.removeChild(draggedElement) } + if (sourceContainer === currentTarget && sourceContainer.id === 'selector-items') return if (draggedElement) { const src = dataTransfer.getData('text/plain') const imgElement = createItem(src)