Fix crash when declare timestamps are missing
This commit is contained in:
1 parent
1a56915d4b
commit
476532af54
1 file changed
+6
-3
+6
-3
@@ -1016,9 +1016,12 @@ function rpcRequest(sessionContext, _declarations, callback) {
|
||||
// Enforce max timestamp
|
||||
if (d.pathGet > sessionContext.timestamp)
|
||||
d.pathGet = sessionContext.timestamp;
|
||||
for (const [k, v] of Object.entries(d.attrGet)) {
|
||||
if (v > sessionContext.timestamp)
|
||||
d.attrGet[k] = sessionContext.timestamp;
|
||||
|
||||
if (d.attrGet) {
|
||||
for (const [k, v] of Object.entries(d.attrGet)) {
|
||||
if (v > sessionContext.timestamp)
|
||||
d.attrGet[k] = sessionContext.timestamp;
|
||||
}
|
||||
}
|
||||
|
||||
for (const ad of device.getAliasDeclarations(d.path, 1))
|
||||
|
||||
Reference in new issue
Block a user