Closed
Description
Describe the bug
There is an error in console when you configure the workspace with maxTrashcanContents
set to 0 but trashcan
is true
or the toolbox has categories.
To Reproduce
- Set
maxTrashcanContents
to0
andtrashcan
totrue
while configuring the workspace. - Click on the trash icon
Expected behavior
Everything works fine but when the trashcan is clicked, an error is thrown which can be see in the console. Ideally, this error should not be thrown.
ERROR TypeError: Cannot read properties of null (reading 'isVisible')
at Blockly.Trashcan.contentsIsOpen (blockly_compressed.js:998)
at Blockly.Trashcan.blockMouseDownWhenOpenable_ (blockly_compressed.js:1006)
at SVGGElement.e (blockly_compressed.js:58)
at ZoneDelegate.invokeTask (zone.js:406)
at Object.onInvokeTask (core.js:28679)
at ZoneDelegate.invokeTask (zone.js:405)
at Zone.runTask (zone.js:178)
at ZoneTask.invokeTask [as invoke] (zone.js:487)
at invokeTask (zone.js:1600)
at SVGGElement.globalZoneAwareCallback (zone.js:1626)
Additional context
Seems like this line is the problem
Line 419 in 64188ae
It assumes that this.flyout
is always available, but it is null
when maxTrashcanContents
is 0.
Metadata
Metadata
Assignees
Labels
No labels