Fix sneaky bug causing declaration leakage

Resolves: #211
This commit is contained in:
Zaid Abdulla committed 2017-03-04 06:03:38 -08:00
1 parent 0788b93350
commit 848894d3e3
1 file changed
+6 -1
+6 -1
View File
@@ -1077,7 +1077,12 @@ processDeclarations = (sessionContext, allDeclareTimestamps, allDeclareAttribute
for path in paths
if path.length > currentPath.length
fragment = path[currentPath.length]
children[fragment] ?= []
if not children[fragment]
children[fragment] = []
if path.length > currentPath.length + 1
# This is to ensure we don't descend more than one step at a time
p = common.addPathMeta(path.slice(0, currentPath.length + 1))
children[fragment].push(p)
children[fragment].push(path)
continue