diff options
author | Christoph Wurst <christoph@winzerhof-wurst.at> | 2022-04-06 21:05:45 +0300 |
---|---|---|
committer | Christoph Wurst <christoph@winzerhof-wurst.at> | 2022-04-07 10:20:00 +0300 |
commit | c9d343725f159a897228e0396eb552a4bbceaf9e (patch) | |
tree | f4990afd5fcaaec2c1c49bbe3826fd5da443bf5d /src | |
parent | 49470b953023d26704de517ea48be1516773bb05 (diff) |
Only delete drafts that exist
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'src')
-rw-r--r-- | src/components/NewMessageModal.vue | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/components/NewMessageModal.vue b/src/components/NewMessageModal.vue index 0135e5d15..e9961ed62 100644 --- a/src/components/NewMessageModal.vue +++ b/src/components/NewMessageModal.vue @@ -124,9 +124,11 @@ export default { await this.$store.dispatch('outbox/sendMessage', { id: message.id }) - // Remove old draft envelope - this.$store.commit('removeEnvelope', { id: data.draftId }) - this.$store.commit('removeMessage', { id: data.draftId }) + if (data.draftId) { + // Remove old draft envelope + this.$store.commit('removeEnvelope', { id: data.draftId }) + this.$store.commit('removeMessage', { id: data.draftId }) + } } }, recipientToRfc822(recipient) { |