aboutsummaryrefslogtreecommitdiff
path: root/src/cleaners/skyblock/inventory.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/cleaners/skyblock/inventory.ts')
-rw-r--r--src/cleaners/skyblock/inventory.ts4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/cleaners/skyblock/inventory.ts b/src/cleaners/skyblock/inventory.ts
index 1b49e95..96cd629 100644
--- a/src/cleaners/skyblock/inventory.ts
+++ b/src/cleaners/skyblock/inventory.ts
@@ -27,7 +27,9 @@ interface Item {
export type Inventory = Item[]
function cleanItem(rawItem): Item {
- const vanillaId: number = rawItem.id
+ // if the item doesn't have an id, it isn't an item
+ if (rawItem.id === undefined) return null
+ const vanillaId: number = rawItem.id && -1
const itemCount = rawItem.Count
const damageValue = rawItem.Damage
const itemTag = rawItem.tag