Skip to content

Commit

Permalink
Fix non-personalized category selection
Browse files Browse the repository at this point in the history
  • Loading branch information
zhenghaoz committed Dec 21, 2024
1 parent bfba4f3 commit 4638fea
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/components/common/CategorizedItems.vue
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ export default {
},
})
.then((response) => {
this.items = response.data;
this.items = response.data === null ? [] : response.data;
});
},
computed: {
Expand Down Expand Up @@ -137,19 +137,19 @@ export default {
},
})
.then((response) => {
this.items = response.data;
this.items = response.data === null ? [] : response.data;
});
},
changeCategory(value) {
this.category = value;
axios.get('/api/dashboard/non-personalized/popular/', {
axios.get(`/api/dashboard/non-personalized/${this.recommender}/`, {
params: {
category: value,
end: this.cacheSize,
},
})
.then((response) => {
this.items = response.data;
this.items = response.data === null ? [] : response.data;
});
},
},
Expand Down

0 comments on commit 4638fea

Please sign in to comment.