Skip to content

Commit

Permalink
dont try to show error on blocks not in the sprite
Browse files Browse the repository at this point in the history
  • Loading branch information
JeremyGamer13 committed Dec 15, 2023
1 parent 9f30582 commit a59173b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/containers/blocks.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a59173b

Please sign in to comment.