Skip to content

Commit 661533e

Browse files
gonfunkosebjacobs
authored andcommitted
fix: update the toolbox in response to procedure deletion/creation (scratchfoundation#18)
1 parent 562af28 commit 661533e

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/containers/blocks.jsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,11 @@ class Blocks extends React.Component {
151151
if (
152152
event.type === this.ScratchBlocks.Events.VAR_CREATE ||
153153
event.type === this.ScratchBlocks.Events.VAR_RENAME ||
154-
event.type === this.ScratchBlocks.Events.VAR_DELETE
154+
event.type === this.ScratchBlocks.Events.VAR_DELETE ||
155+
(event.type === this.ScratchBlocks.Events.BLOCK_DELETE &&
156+
event.oldJson.type === "procedures_definition") ||
157+
(event.type === this.ScratchBlocks.Events.BLOCK_CREATE &&
158+
event.json.type === "procedures_definition")
155159
) {
156160
this.requestToolboxUpdate();
157161
}

0 commit comments

Comments
 (0)