mirror of
https://github.com/sp-tarkov/server.git
synced 2025-02-13 01:50:44 -05:00
Fix: error on profile creation
This commit is contained in:
parent
1659211080
commit
16e1293d55
@ -318,6 +318,11 @@ export class BotGenerator
|
|||||||
*/
|
*/
|
||||||
protected getSkillsWithRandomisedProgressValue(skills: IBaseSkill[]): IBaseSkill[]
|
protected getSkillsWithRandomisedProgressValue(skills: IBaseSkill[]): IBaseSkill[]
|
||||||
{
|
{
|
||||||
|
if (Object.keys(skills).length === 0)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Create a new array of skills with randomised progress value
|
// Create a new array of skills with randomised progress value
|
||||||
return skills.map((skill) => ({
|
return skills.map((skill) => ({
|
||||||
Id: skill.Id,
|
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
|
* Generate a random Id for a bot and apply to bots _id and aid value
|
||||||
* @param bot bot to update
|
* @param bot bot to update
|
||||||
|
Loading…
x
Reference in New Issue
Block a user