Fix: toutes les branches d office fermees (onPath retournait true pour null)

This commit is contained in:
2026-08-14 15:42:33 +02:00
parent 09115e9739
commit 423a89557c
+1 -1
View File
@@ -241,7 +241,7 @@ function RT(){
}; };
dv.appendChild(rw) dv.appendChild(rw)
} }
function onPath(t) { if(!t||t===n)return true; var p=t._p; while(p){if(p===n)return true;p=p._p}return false; } function onPath(t) { if(!t)return false; if(t===n)return true; var p=t._p; while(p){if(p===n)return true;p=p._p}return false; }
if(br){var kd=document.createElement('div');kd.className='chd'+(onPath(N)?' o':''); if(br){var kd=document.createElement('div');kd.className='chd'+(onPath(N)?' o':'');
for(var i=0;i<n.children.length;i++){n.children[i]._p=n;RN(kd,n.children[i],d+1)} for(var i=0;i<n.children.length;i++){n.children[i]._p=n;RN(kd,n.children[i],d+1)}
dv.appendChild(kd) dv.appendChild(kd)