Skip to content

Commit

Permalink
Fixed generateUniqueBotNickname() failing when no data is passed in…
Browse files Browse the repository at this point in the history
…to its optional parameter
  • Loading branch information
Chomp committed Dec 6, 2024
1 parent 43025ed commit e7f5db9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion project/src/services/BotNameService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export class BotNameService {
const isPlayerScav = botGenerationDetails.isPlayerScav;
const simulateScavName = isPlayerScav ? false : this.shouldSimulatePlayerScavName(botRole);
const showTypeInNickname = this.botConfig.showTypeInNickname && !isPlayerScav;
const roleShouldBeUnique = uniqueRoles.includes(botRole.toLowerCase());
const roleShouldBeUnique = uniqueRoles?.includes(botRole.toLowerCase());

let isUnique = true;
let attempts = 0;
Expand Down

0 comments on commit e7f5db9

Please sign in to comment.