Prevent duplicate equipment builds occuring when renaming an existing build
This commit is contained in:
parent
946172d20c
commit
0f6b34605b
@ -122,7 +122,9 @@ export class BuildController
|
||||
Items: request.Items,
|
||||
};
|
||||
|
||||
const existingBuild = existingSavedEquipmentBuilds.find((x) => x.Name === request.Name);
|
||||
const existingBuild = existingSavedEquipmentBuilds.find((build) =>
|
||||
build.Name === request.Name || build.Id === request.Id
|
||||
);
|
||||
if (existingBuild)
|
||||
{
|
||||
// Already exists, replace
|
||||
|
Loading…
Reference in New Issue
Block a user