leopard-js / sb-edit

Javascript library for manipulating Scratch project files
MIT License
54 stars 15 forks source link

toLeopard: Watchers which are only referred to in a "hide variable/list" block don't get generated #86

Closed towerofnix closed 1 year ago

towerofnix commented 1 year ago

Sure, these are technically no-ops, but in the interests of having Leopard/sb-edit not "eat" blocks, it'd be better to define these watchers than just delete associated "hide variable/list" blocks.

As-is we get such errors as:

*whenIReceiveUnDev() {
  this.watchers.infiniteHealth.visible = false;
  this.watchers.absoluteChaos.visible = false;
  this.watchers.infiniteEx.visible = false; // Uncaught TypeError: Cannot set properties of undefined
  this.watchers.infiniStomp.visible = false;
}