Skip to content

Commit 3f2f5fe

Browse files
committed
Prevent endless loop when call JSROOT.parse second time
If object has cross-references, parse methods caused endless recursion
1 parent f37449f commit 3f2f5fe

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

scripts/JSRoot.core.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -919,6 +919,9 @@
919919
return; // pair object is not counted in the objects map
920920
}
921921

922+
// prevent endless loop
923+
if (map.indexOf(value) >= 0) return;
924+
922925
// add object to object map
923926
map.push(value);
924927

0 commit comments

Comments
 (0)