Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Fix featured image is deleted in case of creating new page - EXO…
…-75508 - Meeds-io/meeds#2614 (#1224) Prior to this change, when create new page from draft with featured image and try to delete the draft after saving the new page, the featured image is deleted with the draft, which should not be the case when the featured image is linked to the original saved page, this due to wrong condition handling on the `removeNoteFeaturedImage` function in case of draft of new page. Same issue when delete draft, we don't have a check whether its featured image was associated to saved page or not which may cause non expected file deletion. This PR treats the case by updating the condition to not delete the featured image in case of draft of new page, knowing that in case of delete orphan drafts the featured image deletion is treated out of this function we have updated that case by checking if its linked image was associated to a saved page or not before deleting its related featured Image file.
- Loading branch information