Skip to content

Commit 5893169

Browse files
committed
fix reviews
1 parent b45101b commit 5893169

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

components/TReviewCount.vue

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,11 @@ export default {
2727
}),
2828
computed: {
2929
reviewsCount() {
30-
return this.profile.reviewsCount || this.reviews.length || 0
30+
if (this.profile?.reviewsCount) {
31+
return this.profile.reviewsCount
32+
}
33+
34+
return this.reviews.length || 0
3135
},
3236
reviewsAvg() {
3337
if (this.profile?.reviewsAvg) {
@@ -63,7 +67,7 @@ export default {
6367
6468
let newReviews = []
6569
66-
if (this.username) {
70+
if (this.profile.username) {
6771
const reviewsRef = await firestore
6872
.collection('stories')
6973
.where('receiver.username', '==', this.profile.username)

0 commit comments

Comments
 (0)