diff --git a/plugins/inventory_sync/module/serialize.lua b/plugins/inventory_sync/module/serialize.lua index 3e470db0..53b2a9da 100644 --- a/plugins/inventory_sync/module/serialize.lua +++ b/plugins/inventory_sync/module/serialize.lua @@ -426,10 +426,13 @@ function serialize.serialize_player(player) -- Serialize recipe notifications if recipe_notifications_api then local recipe_notifications = {} - serialized.recipe_notifications = recipe_notifications for i, recipe in ipairs(player.get_recipe_notifications()) do recipe_notifications[i] = recipe.name end + if #recipe_notifications > 0 then + -- Do no add if length is zero as this breaks with table_to_json + serialized.recipe_notifications = recipe_notifications + end end return serialized