Fix possible missed items in cache

This commit is contained in:
Jean-Patrick Guerrero 2020-07-14 19:20:13 +02:00
parent e6d1857799
commit c0823faad3
1 changed files with 3 additions and 3 deletions

View File

@ -700,10 +700,10 @@ local function cache_recipes(item)
item = reg_aliases[item] or item
local def = reg_items[item]
if not def then return end
local recipes = get_all_recipes(item) or {}
local recipes = get_all_recipes(item)
for i = 1, #recipes do
recipes_cache[item] = table_merge(recipes_cache[item] or {}, recipes[i])
if recipes then
recipes_cache[item] = table_merge(recipes_cache[item], recipes)
end
end