Skip to content

Commit

Permalink
fix: check for player_classes
Browse files Browse the repository at this point in the history
  • Loading branch information
metalcupcake5 committed Nov 21, 2023
1 parent b984451 commit ec3168f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/stats/dungeons.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,8 @@ export async function getDungeons(userProfile, hypixelProfile) {
selected_class: dungeons.selected_dungeon_class ?? "none",
classes: {},
};
for (const className of Object.keys(dungeons.player_classes)) {

for (const className of Object.keys(dungeons?.player_classes ?? {})) {
const data = dungeons.player_classes[className];
if (isNaN(data.experience) === true) {
data.experience = 0;
Expand Down

0 comments on commit ec3168f

Please sign in to comment.