When deleting an image with text in the draft.js editor for image upload, occasionally the IMAGE entity remains even though the image was not rendering on the editor. This causes problems when converting that state into HTML because it appears that there is still an image when in fact it has been deleted but is still present in the state entity.
source: https://codesandbox.io/s/4ql8746pl7
Bug: https://github.com/facebook/draft-js/issues/1510
1. Delete Image & leave some text
2. click log state you will see the image entity was still there (if not happens try 1 2 more times with same steps)
Update: I found it just happening on backspace key while DELETE button it's works well not sure what's the issue