From 87007e20c60aca953e4c7f95babda07db26611ae Mon Sep 17 00:00:00 2001 From: Zaid Abdulla Date: Sun, 14 May 2017 17:43:04 -0700 Subject: [PATCH] Fix no GPN generated for data model root --- lib/session.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/session.coffee b/lib/session.coffee index 4ab5ec8..00997a1 100644 --- a/lib/session.coffee +++ b/lib/session.coffee @@ -886,7 +886,7 @@ generateGetRpcRequest = (sessionContext) -> paths = Array.from(syncState.gpn.keys()).sort((a,b) -> b.length - a.length) 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) path = paths.pop()