mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2024-12-22 22:12:28 -05:00
Don't attempt to glow a block that isn't known in the VM
This commit is contained in:
parent
7cc0c00da6
commit
506e9c32be
1 changed files with 3 additions and 0 deletions
|
@ -233,6 +233,9 @@ Runtime.prototype._step = function () {
|
|||
* @param {boolean} isGlowing True to turn on glow; false to turn off.
|
||||
*/
|
||||
Runtime.prototype.glowBlock = function (blockId, isGlowing) {
|
||||
if (!this.blocks.getBlock(blockId)) {
|
||||
return;
|
||||
}
|
||||
if (isGlowing) {
|
||||
this.emit(Runtime.BLOCK_GLOW_ON, blockId);
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue