Skip to content

Commit 6e7a16e

Browse files
committed
life is full of edge cases
1 parent a53e619 commit 6e7a16e

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎v3/js/pytutor.js‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2343,7 +2343,10 @@ ExecutionVisualizer.prototype.renderDataStructures = function() {
23432343
else {
23442344
// render a parent pointer to the global frame
23452345
//console.log('connect', my_CSS_id, globalsID);
2346-
parentPointerConnectionEndpointIDs.set(my_CSS_id, globalsID);
2346+
// only do this if there are actually some global variables to display ...
2347+
if (curEntry.ordered_globals.length > 0) {
2348+
parentPointerConnectionEndpointIDs.set(my_CSS_id, globalsID);
2349+
}
23472350
}
23482351

23492352
// tricky turkey: render parent pointers whose TARGET node is this frame.

0 commit comments

Comments
 (0)