fix: logic error
All checks were successful
Build / build (18) (push) Successful in 41s
Build / build (20) (push) Successful in 1m0s
Build / build (22) (push) Successful in 56s
Build Docker image / docker (push) Successful in 33s

This commit is contained in:
Sainan 2025-03-10 09:15:11 +01:00
parent 4937cf7f59
commit cadb6bc97b

View File

@ -416,7 +416,7 @@ export const addItem = async (
const key = { ItemType: typeName, ItemCount: quantity }; const key = { ItemType: typeName, ItemCount: quantity };
const index = inventory.LevelKeys.findIndex(levelKey => levelKey.ItemType == typeName); const index = inventory.LevelKeys.findIndex(levelKey => levelKey.ItemType == typeName);
if (index) { if (index != -1) {
inventory.LevelKeys[index].ItemCount += quantity; inventory.LevelKeys[index].ItemCount += quantity;
} else { } else {
inventory.LevelKeys.push(key); inventory.LevelKeys.push(key);