Skip to content
Snippets Groups Projects
Commit fc61ccea authored by onny's avatar onny
Browse files

fix unsubscribing podcast

parent 804a85d7
No related branches found
Tags 0.0.1-pre
No related merge requests found
Pipeline #317 passed
...@@ -106,6 +106,8 @@ export default { ...@@ -106,6 +106,8 @@ export default {
}, },
computed: { computed: {
isSubscribed() { isSubscribed() {
console.log(this.podcastid)
console.log(this.$store.getters.showExists(this.podcastid))
return this.$store.getters.showExists(this.podcastid) return this.$store.getters.showExists(this.podcastid)
}, },
getSubscribeText() { getSubscribeText() {
......
...@@ -36,7 +36,10 @@ export default { ...@@ -36,7 +36,10 @@ export default {
return state.shows.find((show) => show.id === id) return state.shows.find((show) => show.id === id)
}, },
showExists: state => (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: { mutations: {
......
...@@ -74,6 +74,8 @@ export default { ...@@ -74,6 +74,8 @@ export default {
}), }),
computed: { computed: {
isSubscribed() { isSubscribed() {
console.log(this.podcastId)
console.log(this.$store.getters.showExists(this.podcastId))
return this.$store.getters.showExists(this.podcastId) return this.$store.getters.showExists(this.podcastId)
}, },
}, },
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment