|
|
@@ -90,11 +90,15 @@ export default {
|
|
90
|
90
|
|
|
91
|
91
|
const dispatchAction = clear ? `getAll${this.pType}` : `getMore${this.pType}`
|
|
92
|
92
|
|
|
93
|
|
- const res = await this.$store.dispatch(dispatchAction, dispatchParams)
|
|
|
93
|
+ // pType sometimes is undefined so need to dispatch and
|
|
|
94
|
+ // Episodes only needs load call
|
|
|
95
|
+ let res = null
|
|
|
96
|
+ if(this.pType && dispatchAction != `getMoreEpisodes`) {
|
|
|
97
|
+ res = await this.$store.dispatch(dispatchAction, dispatchParams)
|
|
|
98
|
+ }
|
|
94
|
99
|
|
|
95
|
|
- if(res && res.length < 0) {
|
|
|
100
|
+ if(res && !res.length) {
|
|
96
|
101
|
console.warn('nothing left to get...')
|
|
97
|
|
- console.log('responded:', res)
|
|
98
|
102
|
}
|
|
99
|
103
|
},
|
|
100
|
104
|
clearHero() {
|