From 0c6c7b3e40c5f7422e1037a1bdffcad90afc6a7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Fri, 15 May 2020 10:29:06 +0200 Subject: [PATCH 1/3] Fix issue if card description might be null MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- src/components/card/CardSidebar.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/card/CardSidebar.vue b/src/components/card/CardSidebar.vue index 403a9653c..a47980ce1 100644 --- a/src/components/card/CardSidebar.vue +++ b/src/components/card/CardSidebar.vue @@ -325,7 +325,7 @@ export default { }, }, renderedDescription() { - return markdownIt.render(this.copiedCard.description) + return markdownIt.render(this.copiedCard.description || '') }, }, watch: { From 94c9801cae75a3f55d3e4aa38d9606fa48ae212a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Fri, 15 May 2020 11:09:24 +0200 Subject: [PATCH 2/3] Catch duplicate navigation error when navigating cards MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- src/components/cards/CardItem.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/cards/CardItem.vue b/src/components/cards/CardItem.vue index d8f2a219d..16ed4950d 100644 --- a/src/components/cards/CardItem.vue +++ b/src/components/cards/CardItem.vue @@ -146,7 +146,7 @@ export default { }, methods: { openCard() { - this.$router.push({ name: 'card', params: { cardId: this.id } }) + this.$router.push({ name: 'card', params: { cardId: this.id } }).catch(() => {}) }, startEditing(card) { this.copiedCard = Object.assign({}, card) From 176ae245fc2960917eb7c5877ff12f2c9b57696f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Fri, 15 May 2020 11:09:38 +0200 Subject: [PATCH 3/3] Log uncatched vue errors instead of throwing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- src/main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.js b/src/main.js index 93a1d729b..c73025e2c 100644 --- a/src/main.js +++ b/src/main.js @@ -62,7 +62,7 @@ Vue.config.errorHandler = (err, vm, info) => { const errorMessage = t('deck', 'Something went wrong') OCP.Toast.error(`${errorMessage}: ${err.response.data.status} ${err.response.data.message}`) } - throw err + console.error(err) } /* eslint-disable-next-line no-new */