Fix session.serialize bug
This commit is contained in:
1 parent
fd34dd8839
commit
b5efe6c578
1 file changed
+8
@@ -771,6 +771,9 @@ function runDeclarations(
|
|||||||
let path = declaration.path;
|
let path = declaration.path;
|
||||||
let unpacked: Path[];
|
let unpacked: Path[];
|
||||||
|
|
||||||
|
// Can't run declarations on root
|
||||||
|
if (!path.length) continue;
|
||||||
|
|
||||||
if (
|
if (
|
||||||
(path.alias | path.wildcard) & 1 ||
|
(path.alias | path.wildcard) & 1 ||
|
||||||
path.segments[0] === "VirtualParameters"
|
path.segments[0] === "VirtualParameters"
|
||||||
@@ -2621,8 +2624,13 @@ export async function serialize(
|
|||||||
deviceData.push(e);
|
deviceData.push(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const declarations = sessionContext.declarations.map(decs => {
|
||||||
|
return decs.map(d => Object.assign({}, d, { path: d.path.toString() }));
|
||||||
|
});
|
||||||
|
|
||||||
const jsonSessionContext = Object.assign({}, sessionContext, {
|
const jsonSessionContext = Object.assign({}, sessionContext, {
|
||||||
deviceData: deviceData,
|
deviceData: deviceData,
|
||||||
|
declarations: declarations,
|
||||||
syncState: null,
|
syncState: null,
|
||||||
toLoad: null,
|
toLoad: null,
|
||||||
httpRequest: null,
|
httpRequest: null,
|
||||||
|
|||||||
Reference in new issue
Block a user