Skip to content

Commit

Permalink
fix: enclosure removed on cancel
Browse files Browse the repository at this point in the history
  • Loading branch information
Quentin-Guillemin committed Sep 13, 2023
1 parent 5616054 commit fb72677
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions src/main/webapp/src/views/manager/publish/content/Content.vue
Original file line number Diff line number Diff line change
Expand Up @@ -360,15 +360,7 @@ export default {
},
cancel() {
// on cancel we try to remove enclosure only on new item (without id)
if (
!CommonUtils.isDefined(this.item.enclosure) ||
this.item.enclosure === null ||
this.item.enclosure === undefined ||
!CommonUtils.isDefined(this.item.id)
) {
return;
}
this.deleteEnclosure();
if (!this.item.id) this.deleteEnclosure();
},
deleteEnclosure() {
FileManagerService.delete(this.publisher.context.organization.id, true, Base64Utils.encode(this.item.enclosure)).then(() => {
Expand Down

0 comments on commit fb72677

Please sign in to comment.