Fix no GPN generated for data model root

This commit is contained in:
Zaid Abdulla committed 2017-05-14 17:43:04 -07:00
1 parent 549f4f0323
commit 87007e20c6
1 file changed
+1 -1
+1 -1
View File
@@ -886,7 +886,7 @@ generateGetRpcRequest = (sessionContext) ->
paths = Array.from(syncState.gpn.keys()).sort((a,b) -> b.length - a.length) paths = Array.from(syncState.gpn.keys()).sort((a,b) -> b.length - a.length)
path = paths.pop() path = paths.pop()
while path and not sessionContext.deviceData.attributes.has(path) while path and path.length and not sessionContext.deviceData.attributes.has(path)
syncState.gpn.delete(path) syncState.gpn.delete(path)
path = paths.pop() path = paths.pop()