Skip to content

Commit

Permalink
fix: update the toolbox in response to procedure deletion/creation (#18)
Browse files Browse the repository at this point in the history
  • Loading branch information
gonfunko authored Aug 6, 2024
1 parent ee80f13 commit 505011d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/containers/blocks.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,11 @@ class Blocks extends React.Component {
if (
event.type === this.ScratchBlocks.Events.VAR_CREATE ||
event.type === this.ScratchBlocks.Events.VAR_RENAME ||
event.type === this.ScratchBlocks.Events.VAR_DELETE
event.type === this.ScratchBlocks.Events.VAR_DELETE ||
(event.type === this.ScratchBlocks.Events.BLOCK_DELETE &&
event.oldJson.type === "procedures_definition") ||
(event.type === this.ScratchBlocks.Events.BLOCK_CREATE &&
event.json.type === "procedures_definition")
) {
this.requestToolboxUpdate();
}
Expand Down

0 comments on commit 505011d

Please sign in to comment.