Skip to content

Commit

Permalink
SPLAT-1442 dont delete location on drag and drop
Browse files Browse the repository at this point in the history
  • Loading branch information
amalija-ramljak committed Sep 17, 2024
1 parent 6741fda commit 83749e8
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
import { attributes, pluginKey } from '../../../constants';
import deleteLocation from '../remote-resource-location/delete';
import { attributes, pluginKey } from "../../../constants";
import deleteLocation from "../remote-resource-location/delete";

const handleRemove = ({ editor, operation }) => {
if (operation.targetPosition.nodeAfter.name !== pluginKey) {
if (
operation.targetPosition.nodeAfter.name !== pluginKey ||
operation.batch.operations[0].type === "detach"
) {
return;
}

Expand Down

0 comments on commit 83749e8

Please sign in to comment.