aboutsummaryrefslogtreecommitdiff
path: root/src/cleaners
diff options
context:
space:
mode:
authormat <27899617+mat-1@users.noreply.github.com>2021-02-13 23:54:51 -0600
committermat <27899617+mat-1@users.noreply.github.com>2021-02-13 23:54:51 -0600
commitd3c4b954545eae9869f6347e1b6edc580210bfcd (patch)
tree87f96463a131b062eb2cf2a9aca47dec1d7c1e04 /src/cleaners
parent0896aa90b031fcb7c5820e885baa10f984991392 (diff)
downloadskyblock-api-d3c4b954545eae9869f6347e1b6edc580210bfcd.tar.gz
skyblock-api-d3c4b954545eae9869f6347e1b6edc580210bfcd.tar.bz2
skyblock-api-d3c4b954545eae9869f6347e1b6edc580210bfcd.zip
make sure the vanillaId is a string
Diffstat (limited to 'src/cleaners')
-rw-r--r--src/cleaners/skyblock/inventory.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cleaners/skyblock/inventory.ts b/src/cleaners/skyblock/inventory.ts
index 342ece6..1b49e95 100644
--- a/src/cleaners/skyblock/inventory.ts
+++ b/src/cleaners/skyblock/inventory.ts
@@ -27,7 +27,7 @@ interface Item {
export type Inventory = Item[]
function cleanItem(rawItem): Item {
- const vanillaId = rawItem.id
+ const vanillaId: number = rawItem.id
const itemCount = rawItem.Count
const damageValue = rawItem.Damage
const itemTag = rawItem.tag
@@ -35,7 +35,7 @@ function cleanItem(rawItem): Item {
return {
id: extraAttributes?.id ?? null,
count: itemCount ?? 1,
- vanillaId: damageValue ? `${vanillaId}:${damageValue}` : vanillaId,
+ vanillaId: damageValue ? `${vanillaId}:${damageValue}` : vanillaId.toString(),
display: {
name: itemTag?.display?.Name ?? 'null',