Skip to content

Commit 1be2490

Browse files
committed
fix(drag): error when drop selection text to outside
affects: @he-tree/vue
1 parent 883c440 commit 1be2490

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/he-tree-vue/src/components/DraggableTree.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ const cpt = defineComponent({
250250
const rootEl = this.getRootEl();
251251
let dragElement: HTMLElement | null = null; // dragElement is the drag node element
252252
const removePlaceholderWhenEnd = () => {
253-
if (targetTree!.has(targetTree!.placeholderData)) {
253+
if (targetTree?.has(targetTree!.placeholderData)) {
254254
targetTree!.ignoreUpdate(() => {
255255
targetTree!.remove(targetTree!.getStat(targetTree!.placeholderData));
256256
// update together to prevent flick

0 commit comments

Comments
 (0)