From 4c4e2d1f236cffcde18a0535afb76d44c63b66f5 Mon Sep 17 00:00:00 2001 From: Jendrik Date: Thu, 25 Sep 2025 22:55:29 +0200 Subject: [PATCH] bugfixes --- src/module/xml-import/xml-import.mjs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/module/xml-import/xml-import.mjs b/src/module/xml-import/xml-import.mjs index ee5023ab..f88ab7ae 100644 --- a/src/module/xml-import/xml-import.mjs +++ b/src/module/xml-import/xml-import.mjs @@ -43,7 +43,7 @@ function getJsonFromXML(dom) { // initializing object to be returned. let jsonResult = {}; - let attributes = dom.attributes + let attributes = dom.attributes ? dom.attributes : [] for (let attribute of attributes) { jsonResult[attribute.name] = attribute.value } @@ -108,7 +108,7 @@ function calculateBirthdate(json) { */ function mapRawJson(rawJson) { let json = {} - let held = rawJson.held; + let held = rawJson.helden.held; json.name = held.name json.meta = {} json.meta.spezies = held.basis.rasse.string