Added check for nil items in parser filter function.

This commit is contained in:
Andrew Lalis 2022-12-21 15:00:28 +01:00
parent 035c7a4a70
commit 6de1a7b361
1 changed files with 1 additions and 0 deletions

View File

@ -80,6 +80,7 @@ local function parseItemFilterExpression(expr)
expr = "minecraft:" .. expr expr = "minecraft:" .. expr
end end
return function(item) return function(item)
if item == nil then return false end
local matches = stackMatches(item, expr, fuzzy) local matches = stackMatches(item, expr, fuzzy)
if negated then if negated then
matches = not matches matches = not matches