We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 751ee29 + 161a389 commit 652acefCopy full SHA for 652acef
unpacked/jax/output/CommonHTML/jax.js
@@ -376,12 +376,16 @@
376
//
377
getNode: function (node,type) {
378
var name = RegExp("\\b"+type+"\\b");
379
+ var nodes = [];
380
while (node) {
381
for (var i = 0, m = node.childNodes.length; i < m; i++) {
382
var child = node.childNodes[i];
- if (name.test(child.className)) return child;
383
+ if (child) {
384
+ if (name.test(child.className)) return child;
385
+ if (child.id === "") nodes.push(child);
386
+ }
387
}
- node = (node.firstChild && (node.firstChild.id||"") === "" ? node.firstChild : null);
388
+ node = nodes.shift();
389
390
return null;
391
},
0 commit comments