A few fixes for previous commits

This commit is contained in:
Zaid Abdulla committed 2018-08-28 00:34:18 -07:00
1 parent 4b4bcb4516
commit c2d55f08d4
1 file changed
+4 -1
+4 -1
View File
@@ -989,11 +989,13 @@ function rpcRequest(sessionContext, _declarations, callback) {
for (const c of toClear) {
if (c[1] > sessionContext.timestamp) c[1] = sessionContext.timestamp;
if (c[2]) {
for (const [k, v] of Object.entries(c[2])) {
if (v > sessionContext.timestamp)
c[2][k] = sessionContext.timestamp;
}
}
}
sessionContext.declarations.push(decs);
sessionContext.provisionsRet[inception] = ret;
@@ -1696,7 +1698,7 @@ function generateSetRpcRequest(sessionContext) {
}
// Factory reset
if (syncState.reboot) {
if (syncState.factoryReset) {
const p = sessionContext.deviceData.paths.get(["FactoryReset"]);
const attrs = p ? sessionContext.deviceData.attributes.get(p) : null;
if (
@@ -1873,6 +1875,7 @@ function processDeclarations(
}
}
declareAttributeValues =
allDeclareAttributeValues.get(path) || declareAttributeValues;
}
}