reserialize getConfig response for backwards compatibility

This commit is contained in:
Aiden McClelland
2024-07-29 13:00:48 -06:00
parent 36cc9cc1ec
commit 0bc6f972b2
2 changed files with 2 additions and 2 deletions

View File

@@ -315,7 +315,7 @@ export default {
},
},
variants: {
disabled: {},
disabled: undefined,
automatic: {
size: {
type: "number",

View File

@@ -577,7 +577,7 @@ export class SystemForEmbassy implements System {
if (!method) throw new Error("Expecting that the method getConfig exists")
return (await method(polyfillEffects(effects, this.manifest)).then(
(x) => {
if ("result" in x) return x.result
if ("result" in x) return JSON.parse(JSON.stringify(x.result))
if ("error" in x) throw new Error("Error getting config: " + x.error)
throw new Error("Error getting config: " + x["error-code"][1])
},