Skip to content

Commit

Permalink
fix: player_data being undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
DuckySoLucky committed Nov 21, 2023
1 parent 29867fe commit 7972e39
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/stats/skills.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ async function getLevels(userProfile, profileMembers, hypixelProfile, levelCaps)
const SKILL = userProfile.player_data.experience;

const socialExperience = Object.keys(profileMembers).reduce((a, b) => {
return a + profileMembers[b].player_data.experience?.SKILL_SOCIAL || 0;
return a + profileMembers[b].player_data?.experience?.SKILL_SOCIAL || 0;
}, 0);

Object.assign(skillLevels, {
Expand Down

0 comments on commit 7972e39

Please sign in to comment.