From aa946712e00cccfe114fde182e6125bbc84a7b87 Mon Sep 17 00:00:00 2001 From: Akhil Gupta Date: Fri, 19 Feb 2021 15:59:06 +0530 Subject: [PATCH] fix legacy broswer issues on iOS --- client/addPodcast.html | 8 ++++---- client/episodes.html | 17 +++++++++-------- client/index.html | 24 ++++++++++++++---------- client/navbar.html | 4 ++-- client/player.html | 2 +- client/podcast.html | 5 +++-- client/scripts.html | 20 ++++++++++---------- client/settings.html | 5 +++-- 8 files changed, 46 insertions(+), 39 deletions(-) diff --git a/client/addPodcast.html b/client/addPodcast.html index 3789de0..3974c87 100644 --- a/client/addPodcast.html +++ b/client/addPodcast.html @@ -189,8 +189,8 @@ item.already_saved = true; }) .catch(function (error) { - if (error.response) { - Vue.toasted.show(error.response.data?.message, { + if (error.response && error.response.data && error.response.data.message) { + Vue.toasted.show(error.response.data.message, { theme: "bubble", type: "error", position: "top-right", @@ -246,8 +246,8 @@ item.already_saved = true; }) .catch(function (error) { - if (error.response) { - Vue.toasted.show(error.response.data?.message, { + if (error.response && error.response.data && error.response.data.message) { + Vue.toasted.show(error.response.data.message, { theme: "bubble", type: "error", position: "top-right", diff --git a/client/episodes.html b/client/episodes.html index a49172a..9487bb2 100644 --- a/client/episodes.html +++ b/client/episodes.html @@ -221,8 +221,8 @@ row.remove(); }) .catch(function (error) { - if (error.response) { - Vue.toasted.show(error.response.data?.message, { + if (error.response && error.response.data && error.response.data.message) { + Vue.toasted.show(error.response.data.message, { theme: "bubble", type: "error", position: "top-right", @@ -247,8 +247,8 @@ row.remove(); }) .catch(function (error) { - if (error.response) { - Vue.toasted.show(error.response.data?.message, { + if (error.response && error.response.data && error.response.data.message) { + Vue.toasted.show(error.response.data.message, { theme: "bubble", type: "error", position: "top-right", @@ -276,8 +276,9 @@ row.remove(); }) .catch(function (error) { - if (error.response) { - Vue.toasted.show(error.response.data?.message, { + if (error.response && error.response.data && error.response.data.message) { + + Vue.toasted.show(error.response.data.message, { theme: "bubble", type: "error", position: "top-right", @@ -306,8 +307,8 @@ row.remove(); }) .catch(function (error) { - if (error.response) { - Vue.toasted.show(error.response.data?.message, { + if (error.response && error.response.data && error.response.data.message) { + Vue.toasted.show(error.response.data.message, { theme: "bubble", type: "error", position: "top-right", diff --git a/client/index.html b/client/index.html index 46e04ef..01c968b 100644 --- a/client/index.html +++ b/client/index.html @@ -321,11 +321,11 @@ playPodcast(id){openPlayer("",id)}, }, mounted(){ - if(localStorage?.sortOrder){ + if(localStorage && localStorage.sortOrder){ this.sortOrder=localStorage.sortOrder; this.sortPodcasts(this.sortOrder); } - if(localStorage?.layout){ + if(localStorage && localStorage.layout){ this.layout=localStorage.layout; }else{ this.layout='list'; @@ -436,8 +436,9 @@ ); }) .catch(function (error) { - if (error.response) { - Vue.toasted.show(error.response.data?.message, { + if (error.response && error.response.data && error.response.data.message) { + + Vue.toasted.show(error.response.data.message, { theme: "bubble", type: "error", position: "top-right", @@ -472,8 +473,9 @@ }) .catch(function (error) { - if (error.response) { - Vue.toasted.show(error.response.data?.message, { + if (error.response && error.response.data && error.response.data.message) { + + Vue.toasted.show(error.response.data.message, { theme: "bubble", type: "error", position: "top-right", @@ -507,8 +509,9 @@ }); }) .catch(function (error) { - if (error.response) { - Vue.toasted.show(error.response.data?.message, { + if (error.response && error.response.data && error.response.data.message) { + + Vue.toasted.show(error.response.data.message, { theme: "bubble", type: "error", position: "top-right", @@ -542,8 +545,9 @@ app.removePodcast(id) }) .catch(function (error) { - if (error.response) { - Vue.toasted.show(error.response.data?.message, { + if (error.response && error.response.data && error.response.data.message) { + + Vue.toasted.show(error.response.data.message, { theme: "bubble", type: "error", position: "top-right", diff --git a/client/navbar.html b/client/navbar.html index 0ec644c..a9288bc 100644 --- a/client/navbar.html +++ b/client/navbar.html @@ -174,8 +174,8 @@ div#overlay{