From c0c534dafb54ebf9f95a5054f576ad99de29f232 Mon Sep 17 00:00:00 2001 From: mat <27899617+mat-1@users.noreply.github.com> Date: Tue, 29 Jun 2021 17:52:00 -0500 Subject: enable strictNullChecks and fix all related issues (#65) --- src/cleaners/skyblock/inventory.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/cleaners/skyblock/inventory.ts') diff --git a/src/cleaners/skyblock/inventory.ts b/src/cleaners/skyblock/inventory.ts index 890937a..5ad6617 100644 --- a/src/cleaners/skyblock/inventory.ts +++ b/src/cleaners/skyblock/inventory.ts @@ -26,7 +26,7 @@ interface Item { export type Inventory = Item[] -function cleanItem(rawItem): Item { +function cleanItem(rawItem): Item | null { // if the item doesn't have an id, it isn't an item if (rawItem.id === undefined) return null @@ -35,7 +35,7 @@ function cleanItem(rawItem): Item { const damageValue = rawItem.Damage const itemTag = rawItem.tag const extraAttributes = itemTag?.ExtraAttributes ?? {} - let headId: string + let headId: string | undefined if (vanillaId === 397) { const headDataBase64 = itemTag?.SkullOwner?.Properties?.textures?.[0]?.Value -- cgit