Skip to content

Commit 08ae3fe

Browse files
committed
bah
1 parent b973897 commit 08ae3fe

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

‎v3/js/pytutor.js‎

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1629,11 +1629,14 @@ 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 &&
1633-
retStack.length > 0 /* don't try this hack when returning from an external function such as Python eval() that's not visualized */) {
1632+
if (prevIsReturn) {
16341633
var idx = myViz.curInstr - 1;
16351634
var retStack = myViz.curTrace[idx].stack_to_render;
1636-
assert(retStack.length > 0);
1635+
1636+
/* don't try this hack when returning from an external function
1637+
such as Python eval() that's not visualized */
1638+
if (retStack.length > 0) {
1639+
16371640
var retFrameId = retStack[retStack.length - 1].frame_id;
16381641

16391642
// now go backwards until we find a 'call' to this frame
@@ -1657,6 +1660,8 @@ ExecutionVisualizer.prototype.updateOutputFull = function(smoothTransition) {
16571660
prevIsReturn = false; // this is now a call site, not a return
16581661
smoothTransition = false;
16591662
}
1663+
1664+
}
16601665
}
16611666

16621667
if (myViz.pyCrazyMode) {

0 commit comments

Comments
 (0)