Commit fc61ccea authored by onny's avatar onny
Browse files

fix unsubscribing podcast

parent 804a85d7
Pipeline #317 passed with stages
in 11 minutes and 50 seconds
......@@ -106,6 +106,8 @@ export default {
},
computed: {
isSubscribed() {
console.log(this.podcastid)
console.log(this.$store.getters.showExists(this.podcastid))
return this.$store.getters.showExists(this.podcastid)
},
getSubscribeText() {
......
......@@ -36,7 +36,10 @@ export default {
return state.shows.find((show) => show.id === id)
},
showExists: state => (id) => {
return state.shows.some((show) => show.id === id)
if (id !== undefined) {
id = Number(id)
return state.shows.some((show) => show.id === id)
}
},
},
mutations: {
......
......@@ -74,6 +74,8 @@ export default {
}),
computed: {
isSubscribed() {
console.log(this.podcastId)
console.log(this.$store.getters.showExists(this.podcastId))
return this.$store.getters.showExists(this.podcastId)
},
},
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment