sugarlabs / musicblocks

Music Blocks -- A musical microworld
https://musicblocks.sugarlabs.org/
GNU Affero General Public License v3.0
539 stars 727 forks source link

"Load this block" feature not working from block help #3868

Closed pikurasa closed 2 months ago

pikurasa commented 2 months ago

Description

We have what should be a super-handy feature called "Load this block", which should generate the same stack of blocks that is shown for a block's help. However, it's not working

Screenshots

Screenshot from 2024-04-19 09-33-28

How to Reproduce

Right click (or two-finger tap) on a block, choose help (question mark), then choose "load this block" (arrow pointing down); the expected behavior is to generate the stack of blocks into your project. It's not doing that right now (tested on musicblocks.sugarlabs.org and commit 63983ab62 of master branch.

Console log Errors:

Uncaught TypeError: Cannot read properties of undefined (reading 'protoBlockDict')
    at getMacroExpansion (macros.js:132:40)
    at loadButton.onclick (help.js:297:54)
getMacroExpansion @ macros.js:132
loadButton.onclick @ help.js:297