[VarDumper] HtmlDumper: fix collapsing nodes with depth <= maxDepth

This commit is contained in:
Maxime Steinhausser 2017-10-29 21:05:50 +01:00
parent 98dae3edb1
commit a1863c3b7c

View File

@ -383,8 +383,9 @@ return function (root, x) {
x += elt.parentNode.getAttribute('data-depth')/1;
}
elt.setAttribute('data-depth', x);
if (elt.className ? 'sf-dump-expanded' !== elt.className : (x > options.maxDepth)) {
elt.className = 'sf-dump-expanded';
var className = elt.className;
elt.className = 'sf-dump-expanded';
if (className ? 'sf-dump-expanded' !== className : (x > options.maxDepth)) {
toggle(a);
}
} else if (/\bsf-dump-ref\b/.test(elt.className) && (a = elt.getAttribute('href'))) {