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.
1 parent c03e47c commit a7285cdCopy full SHA for a7285cd
scripts/JSRootPainter.hierarchy.js
@@ -763,13 +763,13 @@
763
764
var allow_index = arg.allow_index;
765
if ((localname[0] === '[') && (localname[localname.length-1] === ']') &&
766
- !isNaN(parseInt(localname.substr(1,localname.length-2)))) {
+ /^\d+$/.test(localname.substr(1,localname.length-2))) {
767
allow_index = true;
768
localname = localname.substr(1,localname.length-2);
769
}
770
771
// when search for the elements it could be allowed to check index
772
- if (allow_index) {
+ if (allow_index && /^\d+$/.test(localname)) {
773
var indx = parseInt(localname);
774
if (!isNaN(indx) && (indx>=0) && (indx<top._childs.length))
775
return process_child(top._childs[indx]);
0 commit comments