Skip to content

Commit

Permalink
pkp/pkp-lib#10093 skip updating currentMailable.emailTemplates for ma…
Browse files Browse the repository at this point in the history
…ilables which don't support templates
  • Loading branch information
jardakotesovec committed Jun 24, 2024
1 parent 67733de commit ad632ff
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/components/Container/ManageEmailsPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -430,6 +430,12 @@ export default {
* @param {Object} template The updated values of the template
*/
templateSaved(template) {
setTimeout(() => this.$modal.hide('template'), 1000);
if (!this.currentMailable.supportsTemplates) {
return;
}
const exists =
this.currentMailable.emailTemplates.findIndex(
(t) => t.key === template.key,
Expand All @@ -443,8 +449,6 @@ export default {
} else {
this.currentMailable.emailTemplates.push(template);
}
setTimeout(() => this.closeTemplateModal(), 1000);
},
/**
Expand Down

0 comments on commit ad632ff

Please sign in to comment.