Fix: error on profile creation

This commit is contained in:
Dev 2023-03-21 15:22:36 +00:00
parent 1659211080
commit 16e1293d55

View File

@ -318,6 +318,11 @@ export class BotGenerator
*/
protected getSkillsWithRandomisedProgressValue(skills: IBaseSkill[]): IBaseSkill[]
{
if (Object.keys(skills).length === 0)
{
return;
}
// Create a new array of skills with randomised progress value
return skills.map((skill) => ({
Id: skill.Id,
@ -325,8 +330,6 @@ export class BotGenerator
}));
}
/**
* Generate a random Id for a bot and apply to bots _id and aid value
* @param bot bot to update