Fix bug where declare returns wrong value
This commit is contained in:
1 parent
4288fd5980
commit
3adee03533
1 file changed
+5
-5
+5
-5
@@ -98,13 +98,13 @@ class ParameterWrapper {
|
|||||||
|
|
||||||
if (state.revision !== unpackedRevision) {
|
if (state.revision !== unpackedRevision) {
|
||||||
unpackedRevision = state.revision;
|
unpackedRevision = state.revision;
|
||||||
unpacked = device.unpack(state.sessionContext.deviceData, path, state.revision + 1);
|
unpacked = device.unpack(state.sessionContext.deviceData, path, state.revision);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!unpacked.length)
|
if (!unpacked.length)
|
||||||
return undefined;
|
return undefined;
|
||||||
|
|
||||||
let attr = state.sessionContext.deviceData.attributes.get(unpacked[0], state.revision + 1)[attrName];
|
let attr = state.sessionContext.deviceData.attributes.get(unpacked[0], state.revision)[attrName];
|
||||||
|
|
||||||
if (!attr)
|
if (!attr)
|
||||||
return undefined;
|
return undefined;
|
||||||
@@ -119,7 +119,7 @@ class ParameterWrapper {
|
|||||||
|
|
||||||
if (state.revision !== unpackedRevision) {
|
if (state.revision !== unpackedRevision) {
|
||||||
unpackedRevision = state.revision;
|
unpackedRevision = state.revision;
|
||||||
unpacked = device.unpack(state.sessionContext.deviceData, path, state.revision + 1);
|
unpacked = device.unpack(state.sessionContext.deviceData, path, state.revision);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!unpacked.length)
|
if (!unpacked.length)
|
||||||
@@ -134,7 +134,7 @@ class ParameterWrapper {
|
|||||||
|
|
||||||
if (state.revision !== unpackedRevision) {
|
if (state.revision !== unpackedRevision) {
|
||||||
unpackedRevision = state.revision;
|
unpackedRevision = state.revision;
|
||||||
unpacked = device.unpack(state.sessionContext.deviceData, path, state.revision + 1);
|
unpacked = device.unpack(state.sessionContext.deviceData, path, state.revision);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!unpacked.length)
|
if (!unpacked.length)
|
||||||
@@ -149,7 +149,7 @@ class ParameterWrapper {
|
|||||||
|
|
||||||
if (state.revision !== unpackedRevision) {
|
if (state.revision !== unpackedRevision) {
|
||||||
unpackedRevision = state.revision;
|
unpackedRevision = state.revision;
|
||||||
unpacked = device.unpack(state.sessionContext.deviceData, path, state.revision + 1);
|
unpacked = device.unpack(state.sessionContext.deviceData, path, state.revision);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (let p of unpacked)
|
for (let p of unpacked)
|
||||||
|
|||||||
Reference in new issue
Block a user