Skip to content

Commit

Permalink
Merge pull request #5725 from kiva/fix-equality-my-kiva-ty
Browse files Browse the repository at this point in the history
fix: resolve issue where equality badge wasn't being shown
  • Loading branch information
dyersituations authored Dec 5, 2024
2 parents 0b50dfb + aab297a commit 9fe7f85
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/pages/Thanks/ThanksPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -642,7 +642,10 @@ export default {
});
this.badgesAchieved = response?.postCheckoutAchievements?.overallProgress ?? [];
// Don't show badges without a new tier achieved
this.badgesAchieved = this.badgesAchieved.filter(b => b.preCheckoutTier !== b.postCheckoutTier);
this.badgesAchieved = this.badgesAchieved.filter(b => {
// The equality badge doesn't have tiers
return b.preCheckoutTier === null || b.preCheckoutTier !== b.postCheckoutTier;
});
// MyKiva view only shown if user is guest, is not opted-in, or checkout achieved badges
this.myKivaEnabled = this.isGuest || !this.optedIn || this.badgesAchieved.length > 0;
} catch (e) {
Expand Down

0 comments on commit 9fe7f85

Please sign in to comment.