0
0
mirror of https://github.com/sp-tarkov/server.git synced 2025-02-13 09:50:43 -05:00

Fix error when created multiple items with the same unique ID (!269)

Fixes issue #592
SPT-AKI/Issues#592

Reviewed-on: SPT-AKI/Server#269
Co-authored-by: Leaves <mwarciel@gmail.com>
Co-committed-by: Leaves <mwarciel@gmail.com>
This commit is contained in:
Leaves 2024-03-25 08:32:01 +00:00 committed by chomp
parent 757c4506f5
commit 0bb7d1d350
2 changed files with 4 additions and 0 deletions

View File

@ -53,6 +53,7 @@ export class CreateItemResult
constructor()
{
this.success = false;
this.errors = [];
}
success: boolean;

View File

@ -55,6 +55,9 @@ export class CustomItemService
if (tables.templates.items[newItemId])
{
result.errors.push(`ItemId already exists. ${tables.templates.items[newItemId]._name}`);
result.success = false;
result.itemId = newItemId;
return result;
}