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{