diff options
author | dartcafe <github@dartcafe.de> | 2021-02-27 16:21:22 +0300 |
---|---|---|
committer | dartcafe <github@dartcafe.de> | 2021-02-27 16:21:22 +0300 |
commit | 45ca1fa8e97ccf6e35fe5a2516b6b68b04f87a3d (patch) | |
tree | 88c745ccf9535d1ce59ce41d6b9a97d89fe11b75 /src/js/components/SideBar/SideBarTabConfiguration.vue | |
parent | 09be13f03bcb7b149d6e942ead21949eb7975af1 (diff) |
js code maintenance and tidy
Signed-off-by: dartcafe <github@dartcafe.de>
Diffstat (limited to 'src/js/components/SideBar/SideBarTabConfiguration.vue')
-rw-r--r-- | src/js/components/SideBar/SideBarTabConfiguration.vue | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/js/components/SideBar/SideBarTabConfiguration.vue b/src/js/components/SideBar/SideBarTabConfiguration.vue index d7041b26..a3e5e2ef 100644 --- a/src/js/components/SideBar/SideBarTabConfiguration.vue +++ b/src/js/components/SideBar/SideBarTabConfiguration.vue @@ -327,8 +327,8 @@ export default { this.writeValue(e) }, 1500), - successDebounced: debounce(function(response) { - showSuccess(t('polls', '"{pollTitle}" successfully saved', { pollTitle: response.data.title })) + successDebounced: debounce(function(title) { + showSuccess(t('polls', '"{pollTitle}" successfully saved', { pollTitle: title })) emit('update-polls') }, 1500), @@ -361,7 +361,7 @@ export default { await this.$store.dispatch('poll/delete', { pollId: this.poll.id }) emit('update-polls') this.$router.push({ name: 'list', params: { type: 'relevant' } }) - } catch (e) { + } catch { showError(t('polls', 'Error deleting poll.')) } }, @@ -371,9 +371,9 @@ export default { showError(t('polls', 'Title must not be empty!')) } else { try { - const response = await this.$store.dispatch('poll/update') - this.successDebounced(response) - } catch (e) { + await this.$store.dispatch('poll/update') + this.successDebounced(this.poll.title) + } catch { showError(t('polls', 'Error writing poll')) } } |