From ffa3788d471349689162db7a2db525e555416439 Mon Sep 17 00:00:00 2001 From: Preston Date: Wed, 16 Sep 2020 08:58:39 -0400 Subject: [PATCH] Fix API Callback looping if fallback is enabled --- src/renderer/components/data-settings/data-settings.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/renderer/components/data-settings/data-settings.js b/src/renderer/components/data-settings/data-settings.js index fbb6b388..6708f9e4 100644 --- a/src/renderer/components/data-settings/data-settings.js +++ b/src/renderer/components/data-settings/data-settings.js @@ -793,14 +793,14 @@ export default Vue.extend({ console.log(err) const errorMessage = this.$t('Invidious API Error (Click to copy)') this.showToast({ - message: `${errorMessage}: ${err.responseText}`, + message: `${errorMessage}: ${err.responseJSON.error}`, time: 10000, action: () => { - navigator.clipboard.writeText(err) + navigator.clipboard.writeText(err.responseJSON.error) } }) - if (this.backendFallback) { + if (this.backendFallback && this.backendPreference === 'invidious') { this.showToast({ message: this.$t('Falling back to the local API') }) @@ -827,7 +827,7 @@ export default Vue.extend({ } }) - if (this.backendFallback) { + if (this.backendFallback && this.backendPreference === 'local') { this.showToast({ message: this.$t('Falling back to the Invidious API') })