From d3c4b954545eae9869f6347e1b6edc580210bfcd Mon Sep 17 00:00:00 2001 From: mat <27899617+mat-1@users.noreply.github.com> Date: Sat, 13 Feb 2021 23:54:51 -0600 Subject: make sure the vanillaId is a string --- src/cleaners/skyblock/inventory.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/cleaners/skyblock') 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', -- cgit