diff --git a/ghost/admin/app/components/modals/design/confirm-delete-theme.js b/ghost/admin/app/components/modals/design/confirm-delete-theme.js index 605ddb6414..6023109861 100644 --- a/ghost/admin/app/components/modals/design/confirm-delete-theme.js +++ b/ghost/admin/app/components/modals/design/confirm-delete-theme.js @@ -18,6 +18,9 @@ export default class ConfirmDeleteThemeComponent extends Component { *deleteThemeTask() { try { yield this.args.data.theme.destroyRecord(); + // we need to unload from the store here so that uploading another + // theme with the same "id" doesn't attempt to update the deleted record + this.args.data.theme.unloadRecord(); this.args.close(); return true; } catch (error) {