Skip to content

Commit

Permalink
Fix profile ids (#779)
Browse files Browse the repository at this point in the history
Because profile ids now include dashes, it broke not entering any id to return the latest profile
  • Loading branch information
Altpapier committed May 29, 2023
1 parent 5111204 commit 33b5844
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions store/buildSkyBlockProfiles.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,11 @@ async function buildProfile(uuid, id = null) {
// If no id is specified, use last played profile
if (id === null) {
[profile_id] = getLatestProfile(profiles);
} else if (id.length < 32) {
} else if (id.length < 36) {
profile_id = Object.keys(profiles).find((profile) => profiles[profile].cute_name.toLowerCase() === id.toLowerCase()) || null;
}

if (profile_id === null || profile_id.length !== 32) {
if (profile_id === null || profile_id.length !== 36) {
throw new Error('Profile not found!');
}

Expand Down

0 comments on commit 33b5844

Please sign in to comment.