Commit 4382c0c4b872986e830257b33cf9040f2fca63b9
1 parent
e32e9093
Lwm2m: front: fix bug2 updateObserve...ToJson
Showing
1 changed file
with
8 additions
and
8 deletions
... | ... | @@ -269,18 +269,18 @@ export class Lwm2mDeviceProfileTransportConfigurationComponent implements Contro |
269 | 269 | obj.instances.forEach(instance => { |
270 | 270 | if (instance.hasOwnProperty(RESOURCES) && Array.isArray(instance.resources)) { |
271 | 271 | instance.resources.forEach(resource => { |
272 | - let pathRes = `/${obj.id}/${instance.id}/${resource.id}`; | |
273 | - if (resource.attribute) { | |
274 | - attributeArray.push(pathRes); | |
275 | - } | |
276 | - if (resource.telemetry) { | |
277 | - telemetryArray.push(pathRes); | |
278 | - } | |
279 | 272 | if (resource.attribute || resource.telemetry) { |
280 | - keyNameNew[pathRes] = resource.keyName; | |
273 | + let pathRes = `/${obj.id}/${instance.id}/${resource.id}`; | |
281 | 274 | if (resource.observe) { |
282 | 275 | observeArray.push(pathRes); |
283 | 276 | } |
277 | + if (resource.attribute) { | |
278 | + attributeArray.push(pathRes); | |
279 | + } | |
280 | + if (resource.telemetry) { | |
281 | + telemetryArray.push(pathRes); | |
282 | + } | |
283 | + keyNameNew[pathRes] = resource.keyName; | |
284 | 284 | } |
285 | 285 | }) |
286 | 286 | } | ... | ... |