Skip to content

Commit b83be46

Browse files
committed
Added comment.
1 parent 8955552 commit b83be46

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/blocks/mrc_class_method_def.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,9 @@ const CLASS_METHOD_DEF = {
188188
nameField.setValidator(this.mrcNameFieldValidator.bind(this, nameField));
189189
} else {
190190
input.insertFieldAt(0, createFieldNonEditableText(name), FIELD_METHOD_NAME);
191-
// To call setMutator(null), this must be casted to BlockSvg.
191+
// Block.setMutator is defined as setMutator(_mutator: MutatorIcon) and BlockSvg.setMutator
192+
// is defined as setMutator(mutator: MutatorIcon | null).
193+
// Therefore, to call setMutator(null), this must be casted to BlockSvg.
192194
if (this.rendered) {
193195
(this as unknown as Blockly.BlockSvg).setMutator(null);
194196
}

0 commit comments

Comments
 (0)