From 54557a79c57aa0d5a28f86c34039e23ebe6fcb35 Mon Sep 17 00:00:00 2001 From: Cooldude2606 <25043174+Cooldude2606@users.noreply.github.com> Date: Mon, 2 Mar 2026 16:39:20 +0000 Subject: [PATCH] Do not add empty array for recipe notifications --- plugins/inventory_sync/module/serialize.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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