Closed fsih closed 6 years ago
The reason this is happening is because the monitored block for the variable reporter is not being deleted when the variable is deleted. The VM is actually running the opcode for getVariable, which runs a lookupOrCreateVariable
, emphasis on the Create part. The variable was deleted but then re-created. vm/scratch3_data.js only passes the variable ID to lookupOrCreateVariable
, which is what causes the variable name to appear as undefined
.
@fsih we should move this issue to VM because it is only a vm problem, not scratch-blocks.
Moved to https://github.com/LLK/scratch-vm/issues/775. Thanks for investigating!
Expected Behavior
No undefined variables
Actual Behavior
undefined variable appears
Steps to Reproduce
all appears well
There is now a variable called "undefined"
Operating System and Browser
Windows 10 Chrome