@ckeditor/ckeditor5-image 43.3.1 → 44.0.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -3837,7 +3837,12 @@ const IMAGE_URL_REGEXP = new RegExp(String(/^(http(s)?:\/\/)?[\w-]+\.[\w.~:/[\]@
3837
3837
  model.enqueueChange({
3838
3838
  isUndoable: false
3839
3839
  }, (writer)=>{
3840
- writer.remove(imageUploadElements.get(loader.id));
3840
+ const node = imageUploadElements.get(loader.id);
3841
+ // Handle situation when the image has been removed and then `abort` exception was thrown.
3842
+ // See: https://github.com/cksource/ckeditor5-commercial/issues/6817
3843
+ if (node && node.root.rootName !== '$graveyard') {
3844
+ writer.remove(node);
3845
+ }
3841
3846
  });
3842
3847
  clean();
3843
3848
  });