You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
isRecursiveCall(procedureCode){letcallCount=5;// Max number of enclosing procedure calls to examine.constsp=this.stack.length-1;for(leti=sp-1;i>=0;i--){constblock=this.target.blocks.getBlock(this.stack[i]);if(block.opcode==='procedures_call'&&block.mutation.proccode===procedureCode){returntrue;}if(--callCount<0)returnfalse;}returnfalse;}
Possible reason: the procedure block from toolbox cannot be get with this.target.blocks.getBlock, so it get undefined. Accessing block.opcode (block is undefined) cause the error.
System Details
Windows 11
Chrome 109.0.5414.122
The text was updated successfully, but these errors were encountered:
aoneill01
changed the title
JS TypeError when clicking a procedure in the toolbox
[ENA-266] JS TypeError when clicking a procedure in the toolbox
Feb 28, 2023
Expected Behavior
No Error
Actual Behavior
Uncaught TypeError: Cannot read properties of undefined (reading 'opcode')
Steps to Reproduce
Other Infomation
It causes endless loop in development mode.
Related code src/engine/thread.js:
Possible reason: the procedure block from toolbox cannot be get with
this.target.blocks.getBlock
, so it get undefined. Accessing block.opcode (block is undefined) cause the error.System Details
Windows 11
Chrome 109.0.5414.122
The text was updated successfully, but these errors were encountered: