From a98b7fb1d88aeffc9c2a1bd3a90495bb513a6094 Mon Sep 17 00:00:00 2001 From: Jean-Patrick Guerrero Date: Wed, 30 Dec 2020 23:48:06 +0100 Subject: [PATCH] Minor fix --- init.lua | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/init.lua b/init.lua index 7265b1c..6da4240 100644 --- a/init.lua +++ b/init.lua @@ -964,10 +964,13 @@ local function get_stack_max(inv, data, is_recipe, rcp) for name in pairs(counts_rcp) do if is_group(name) then local def = reg_items[item] - local groups = extract_groups(name) - if item_has_groups(def.groups, groups) then - counts_inv[name] = (counts_inv[name] or 0) + count + if def then + local groups = extract_groups(name) + + if item_has_groups(def.groups, groups) then + counts_inv[name] = (counts_inv[name] or 0) + count + end end end end