Skip to content

Commit

Permalink
Toast.error on dropping item(s) to the same history
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmedhamidawan committed Mar 5, 2024
1 parent 219e587 commit 4a522f0
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 4a522f0

Please sign in to comment.