diff --git a/src/Logic/Web/LinkedDataLoader.ts b/src/Logic/Web/LinkedDataLoader.ts index 1528b4323..2d02c611c 100644 --- a/src/Logic/Web/LinkedDataLoader.ts +++ b/src/Logic/Web/LinkedDataLoader.ts @@ -331,6 +331,9 @@ export default class LinkedDataLoader { return } output[key] = output[key].map((v) => applyF(v)) + if(!output[key].some(v => v !== undefined)){ + delete output[key] + } } function asBoolean(key: string, invert: boolean = false) { @@ -379,6 +382,7 @@ export default class LinkedDataLoader { } return "€" + Number(p) }) + if (output["charge"] && output["timeUnit"]) { const duration = Number(output["chargeEnd"] ?? "1") - Number(output["chargeStart"] ?? "0")