Skip to content

Commit

Permalink
fix: Don't always assume outfit_info is present
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt Cavanagh committed Aug 20, 2023
1 parent fbf3919 commit 3ccf344
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ps2/commands/verify.command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export class PS2VerifyCommand {
const outfitId = this.config.get('app.ps2.outfitId');

// Check if the character is in the Albion guild
if (!character.outfit_info || character.outfit_info.outfit_id !== outfitId) {
if (!character?.outfit_info || character?.outfit_info.outfit_id !== outfitId) {
return `Your character "${character.name.first}" has not been detected in the [DIG] outfit. If you are in the outfit, please log out and in again, or wait 24 hours and try again as Census (the game's API) can be slow to update sometimes.`;
}

Expand Down

0 comments on commit 3ccf344

Please sign in to comment.