jmoenig / Snap

a visual programming language inspired by Scratch
http://snap.berkeley.edu
GNU Affero General Public License v3.0
1.47k stars 739 forks source link

Demo within block editor is affected by duplicate #3342

Closed brianharvey closed 2 months ago

brianharvey commented 2 months ago

From https://forum.snap.berkeley.edu/t/demo-within-block-editor-is-affected-by-duplicate/16536:

I often include a little demo of a custom block within the block editor, below the block definition. Thus I can always test if any changes I make to the definition code work out well. Ans if anyone else would like to use the custom block (e.g. as part of a library), the demo is part of the documentation, showing how to use it.

However something strange happens when I make a duplicate of the original block (right-click at the block; select "duplicate block definition"): the demo code with the original block's definition is now calling the duplicate block.

jmoenig commented 2 months ago

Ugh, what an ugly bug! Thanks for reporting, will fix asap...