1
0
mirror of https://github.com/minetest-mods/craftguide.git synced 2024-12-14 18:50:17 +01:00

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

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