mirror of
https://github.com/tribufu/node-gamedig
synced 2026-05-06 07:07:33 +00:00
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)
This commit is contained in:
parent
f251e89e3f
commit
d7e9bba3cf
1 changed files with 1 additions and 1 deletions
|
|
@ -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 }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue