Skip to content

Commit 89f6db3

Browse files
authored
fix null pointer check again (#11162)
1 parent 45da5f7 commit 89f6db3

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

pxtblocks/fields/field_animation.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ export class FieldAnimationEditor extends FieldAssetEditor<FieldAnimationOptions
236236
onDispose() {
237237
super.onDispose();
238238

239-
const root = (this.sourceBlock_ as Blockly.BlockSvg)?.getSvgRoot();
239+
const root = (this.sourceBlock_ as Blockly.BlockSvg)?.getSvgRoot?.();
240240
if (root) {
241241
root.removeEventListener("mouseenter", this.onMouseEnter);
242242
root.removeEventListener("mouseleave", this.cancelAnimation);

0 commit comments

Comments
 (0)