fix: Fix blocks with mutators. (#6440)

* refactor: Revert the Mutator/Icon constructor API changes with a deprecation warning.

* fix: Update the block definitions to use the new Mutator constructor.
This commit is contained in:
Aaron Dodson
2022-09-27 13:42:52 -07:00
committed by GitHub
parent 9c81e7591a
commit ab03c65f9f
8 changed files with 84 additions and 57 deletions

View File

@@ -98,7 +98,7 @@ export function registerMutator(
// Sanity checks passed.
register(name, function(this: Block) {
if (hasMutatorDialog) {
this.setMutator(new Mutator(this as BlockSvg, opt_blockList || []));
this.setMutator(new Mutator(opt_blockList || [], this as BlockSvg));
}
// Mixin the object.
this.mixin(mixinObj);