From d7e9bba3cfd9211307f421743dc440c83715946b Mon Sep 17 00:00:00 2001 From: yellowfromseegg <95318044+yellowfromseegg@users.noreply.github.com> Date: Tue, 29 Jul 2025 09:23:05 +0200 Subject: [PATCH] fix(game/farmingsimulator): handle possible missing mod attribute (#723) Fixed Problem with vanilla servers. when no mods are activated on the server the mod part is missing in the xml. (https://github.com/gamedig/node-gamedig/issues/722) --- protocols/farmingsimulator.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/protocols/farmingsimulator.js b/protocols/farmingsimulator.js index 9017881..9376b3d 100644 --- a/protocols/farmingsimulator.js +++ b/protocols/farmingsimulator.js @@ -50,7 +50,7 @@ export default class farmingsimulator extends Core { mods: [] } - const mods = serverInfo.Mods.Mod + const mods = serverInfo?.Mods?.Mod || []; for (const mod of mods) { if (mod['@_name'] == null) { continue }