File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
packages/xl-multi-column/src/extensions/DropCursor Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -145,7 +145,9 @@ export function multiColumnDropCursor(
145145 id : UniqueID . options . generateID ( ) ,
146146 } ) ;
147147
148- editor . removeBlocks ( [ draggedBlock ] ) ;
148+ if ( editor . getBlock ( draggedBlock . id ) ) {
149+ editor . removeBlocks ( [ draggedBlock ] ) ;
150+ }
149151
150152 editor . updateBlock ( columnList , {
151153 children : newChildren ,
@@ -162,7 +164,11 @@ export function multiColumnDropCursor(
162164
163165 const blocks =
164166 position === "left" ? [ draggedBlock , block ] : [ block , draggedBlock ] ;
165- editor . removeBlocks ( [ draggedBlock ] ) ;
167+
168+ if ( editor . getBlock ( draggedBlock . id ) ) {
169+ editor . removeBlocks ( [ draggedBlock ] ) ;
170+ }
171+
166172 editor . replaceBlocks (
167173 [ block ] ,
168174 [
You can’t perform that action at this time.
0 commit comments