Skip to content

Commit b973897

Browse files
committed
teeny
1 parent 8ffa6da commit b973897

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎v3/js/pytutor.js‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1629,7 +1629,8 @@ ExecutionVisualizer.prototype.updateOutputFull = function(smoothTransition) {
16291629
think that looks more sensible, since line 4 was the previous
16301630
line that executed *in this function's frame*.
16311631
*/
1632-
if (prevIsReturn) {
1632+
if (prevIsReturn &&
1633+
retStack.length > 0 /* don't try this hack when returning from an external function such as Python eval() that's not visualized */) {
16331634
var idx = myViz.curInstr - 1;
16341635
var retStack = myViz.curTrace[idx].stack_to_render;
16351636
assert(retStack.length > 0);

0 commit comments

Comments
 (0)