Skip to content

Commit

Permalink
Add asseration.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mati365 committed Nov 15, 2024
1 parent 69c0c45 commit 3ae06b1
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,11 @@ export default class ImageUploadEditing extends Plugin {

// Permanently remove image from insertion batch.
model.enqueueChange( { isUndoable: false }, writer => {
writer.remove( imageUploadElements.get( loader.id )! );
const node = imageUploadElements.get( loader.id )!;

if ( node && node.root.rootName !== '$graveyard' ) {
writer.remove( node );
}
} );

clean();
Expand Down

0 comments on commit 3ae06b1

Please sign in to comment.