Skip to content

Commit fed099c

Browse files
authored
Fix isRecursiveCall failing on flyout blocks (#227)
1 parent 179030a commit fed099c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/engine/thread.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,8 @@ class Thread {
451451
let callCount = 5; // Max number of enclosing procedure calls to examine.
452452
const sp = this.stackFrames.length - 1;
453453
for (let i = sp - 1; i >= 0; i--) {
454-
const block = this.target.blocks.getBlock(this.stackFrames[i].op.id);
454+
const block = this.target.blocks.getBlock(this.stackFrames[i].op.id) ||
455+
this.target.runtime.flyoutBlocks.getBlock(this.stackFrames[i].op.id);
455456
if (block.opcode === 'procedures_call' &&
456457
block.mutation.proccode === procedureCode) {
457458
return true;

0 commit comments

Comments
 (0)