mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-30 12:11:56 +00:00
reserialize getConfig response for backwards compatibility
This commit is contained in:
@@ -315,7 +315,7 @@ export default {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
variants: {
|
variants: {
|
||||||
disabled: {},
|
disabled: undefined,
|
||||||
automatic: {
|
automatic: {
|
||||||
size: {
|
size: {
|
||||||
type: "number",
|
type: "number",
|
||||||
|
|||||||
@@ -577,7 +577,7 @@ export class SystemForEmbassy implements System {
|
|||||||
if (!method) throw new Error("Expecting that the method getConfig exists")
|
if (!method) throw new Error("Expecting that the method getConfig exists")
|
||||||
return (await method(polyfillEffects(effects, this.manifest)).then(
|
return (await method(polyfillEffects(effects, this.manifest)).then(
|
||||||
(x) => {
|
(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)
|
if ("error" in x) throw new Error("Error getting config: " + x.error)
|
||||||
throw new Error("Error getting config: " + x["error-code"][1])
|
throw new Error("Error getting config: " + x["error-code"][1])
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user