From 7dff5784222b9499a4fd94842c03f5566862e4e4 Mon Sep 17 00:00:00 2001 From: Luca Date: Thu, 22 Oct 2020 18:06:23 +0200 Subject: [PATCH] Added dfault fallback to the geoLocation --- .../components/general-settings/general-settings.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/renderer/components/general-settings/general-settings.js b/src/renderer/components/general-settings/general-settings.js index 6019ceb3..616f705d 100644 --- a/src/renderer/components/general-settings/general-settings.js +++ b/src/renderer/components/general-settings/general-settings.js @@ -652,7 +652,10 @@ export default Vue.extend({ this.currentLocale = this.$i18n.locale this.currentGeoLocation = this.$i18n.geoLocation - this.updateGeoLocationNames(this.currentLocale) + if (this.currentGeoLocation === undefined) { + this.updateGeoLocationNames(this.currentLocale) + this.currentGeoLocation = 'us' + } }, beforeDestroy: function () { if (this.invidiousInstance === '') { @@ -697,7 +700,7 @@ export default Vue.extend({ } const countries = JSON.parse(fileData).map((entry) => { return { id: entry.id, name: entry.name, code: entry.alpha2 } }) countries.sort((a, b) => { return a.id - b.id }) - this.geoLocationArray = countries + this.geoLocationArray = countriess }, ...mapActions([