From eeb73135869169d9e12ac37f2bfb189099043dc3 Mon Sep 17 00:00:00 2001 From: David Leoni Date: Thu, 22 Oct 2020 18:57:05 +0200 Subject: [PATCH] en #9: fixed exception when deleting sprite --- src/extensions/botch/index.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/extensions/botch/index.js b/src/extensions/botch/index.js index a237a2dfd9d..3ea2f18ef7e 100644 --- a/src/extensions/botch/index.js +++ b/src/extensions/botch/index.js @@ -189,15 +189,16 @@ class Scratch3Botch { this.runtime.on(Runtime.SCRIPT_GLOW_OFF, (params => { log.log('script glowing off:', params); - this.resetStoragePendingRequests(params.id); + + this.resetStoragePendingRequests(params.id); // blockId })); this.runtime.on(Runtime.BLOCK_GLOW_OFF, params => { log.log('block glowing off:', params); - this.resetStoragePendingRequests(params.id); + this.resetStoragePendingRequests(params.id); // blockId }); - this.runtime.on(Runtime.STOP_FOR_TARGET, params => { - log.log('STOP_FOR_TARGET:', params); - for (const blockId in params.target.blocks._blocks){ + this.runtime.on(Runtime.STOP_FOR_TARGET, target => { + log.log('STOP_FOR_TARGET:', target); + for (const blockId in target.blocks._blocks){ this.resetStoragePendingRequests(blockId); } });