0
0
mirror of https://github.com/sp-tarkov/server.git synced 2025-02-12 15:50:42 -05:00

Fixed generateUniqueBotNickname() failing when no data is passed into its optional parameter

This commit is contained in:
Chomp 2024-12-06 16:49:39 +00:00
parent 43025ed8e1
commit e7f5db9f0a

View File

@ -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;