From a59173b13fcd685918ad120b69ab1591bfccd5b8 Mon Sep 17 00:00:00 2001 From: JeremyGamer13 <69337718+JeremyGamer13@users.noreply.github.com> Date: Thu, 14 Dec 2023 17:56:06 -0700 Subject: [PATCH] dont try to show error on blocks not in the sprite --- src/containers/blocks.jsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/containers/blocks.jsx b/src/containers/blocks.jsx index 76677a9e0d2..5c1bcc7c942 100644 --- a/src/containers/blocks.jsx +++ b/src/containers/blocks.jsx @@ -419,10 +419,11 @@ class Blocks extends React.Component { // blocks still exist in fullscreen for some reason if (this.props.isFullScreen) return; if (!this.props.vm.editingTarget) return; + const targetBlock = this.workspace.getBlockById(data.id); + if (!targetBlock) return; // this happens when we switch sprites this.workspace.glowBlock(data.id, false); this.workspace.reportValue(data.id, data.value, true); this.workspace.errorStack(data.id, true); - } getToolboxXML () { // Use try/catch because this requires digging pretty deep into the VM