From 4a522f0984aa9866067e3cadc9cd3de4c408c6d0 Mon Sep 17 00:00:00 2001 From: Ahmed Awan Date: Tue, 5 Mar 2024 14:05:22 -0600 Subject: [PATCH] `Toast.error` on dropping item(s) to the same history --- .../src/components/History/CurrentHistory/HistoryPanel.vue | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/client/src/components/History/CurrentHistory/HistoryPanel.vue b/client/src/components/History/CurrentHistory/HistoryPanel.vue index 6f863bdb4deb..6391e3509d14 100644 --- a/client/src/components/History/CurrentHistory/HistoryPanel.vue +++ b/client/src/components/History/CurrentHistory/HistoryPanel.vue @@ -350,7 +350,10 @@ async function onDrop(evt: any) { // this was not a valid object for this dropzone, ignore } - if (!data || historyId === props.history.id) { + if (!data) { + return; + } else if (historyId === props.history.id) { + Toast.error("Cannot copy to the same history"); return; }