Skip to content

Commit

Permalink
common: imporving pinnedSets conditions
Browse files Browse the repository at this point in the history
  • Loading branch information
italojs committed Nov 13, 2023
1 parent 87871ee commit 3592573
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions website/common/script/libs/getOfficialPinnedItems.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ const flatGearArray = _.groupBy(content.gear.flat, 'set');

export default function getOfficialPinnedItems (user) {
const officialItemsArray = [...officialPinnedItems];
const { pinnedSets } = SeasonalShopConfig;

if (SeasonalShopConfig.pinnedSets && Boolean(user) && user.stats.class) {
const setToAdd = SeasonalShopConfig.pinnedSets[user.stats.class];
if (pinnedSets && !_.isEmpty(pinnedSets) && Boolean(user) && user.stats.class) {
const setToAdd = pinnedSets[user.stats.class];

// pinnedSets == current seasonal class set are always gold purchaseable

const gearsBySet = flatGearArray[setToAdd];

for (let i = 0; i < gearsBySet.length; i += 1) {
Expand Down

0 comments on commit 3592573

Please sign in to comment.