Skip to content

Commit acbe2c6

Browse files
authored
fix: properly pass the block to the icon constructor in blockfactory blocks (#7202)
1 parent 7771a6d commit acbe2c6

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

demos/blockfactory/blocks.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -336,8 +336,8 @@ Blockly.Blocks['field_dropdown'] = {
336336
this.updateShape_();
337337
this.setPreviousStatement(true, 'Field');
338338
this.setNextStatement(true, 'Field');
339-
this.setMutator(new Blockly.icons.MutatorIcon(['field_dropdown_option_text',
340-
'field_dropdown_option_image']));
339+
this.setMutator(new Blockly.icons.MutatorIcon(
340+
['field_dropdown_option_text', 'field_dropdown_option_image'], this));
341341
this.setColour(160);
342342
this.setTooltip('Dropdown menu with a list of options.');
343343
this.setHelpUrl('https://www.youtube.com/watch?v=s2_xaEvcVI0#t=386');
@@ -611,7 +611,7 @@ Blockly.Blocks['type_group'] = {
611611
this.typeCount_ = 2;
612612
this.updateShape_();
613613
this.setOutput(true, 'Type');
614-
this.setMutator(new Blockly.icons.MutatorIcon(['type_group_item']));
614+
this.setMutator(new Blockly.icons.MutatorIcon(['type_group_item'], this));
615615
this.setColour(230);
616616
this.setTooltip('Allows more than one type to be accepted.');
617617
this.setHelpUrl('https://www.youtube.com/watch?v=s2_xaEvcVI0#t=677');

0 commit comments

Comments
 (0)