From 3621e712a70f82127de75b1e29fcc3c1da68ed6b Mon Sep 17 00:00:00 2001 From: Linden <65407488+thelindat@users.noreply.github.com> Date: Mon, 5 Sep 2022 11:20:05 +1000 Subject: [PATCH] refactor(server/items): remove error on invalid item This'll just confuse 99% of users. --- modules/items/server.lua | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/modules/items/server.lua b/modules/items/server.lua index 99db1f7004..f71e472ccb 100644 --- a/modules/items/server.lua +++ b/modules/items/server.lua @@ -37,7 +37,7 @@ local trash = { ---@param internal table? ---@param name string? ----@return table +---@return table? local function getItem(internal, name) if name then name = name:lower() @@ -46,13 +46,7 @@ local function getItem(internal, name) name = name:upper() end - local item = ItemList[name] - - if internal and not item then - error(("attempted to fetch data for invalid item '%s'"):format(name)) - end - - return item + return ItemList[name] end return ItemList