Skip to content

Commit f851cc5

Browse files
committed
Fix typescript errors
1 parent 6db7344 commit f851cc5

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

src/blocks/mrc_call_python_function.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -705,7 +705,7 @@ const CALL_PYTHON_FUNCTION = {
705705
// Add a warnings to the block.
706706
const warningText = warnings.join('\n\n');
707707
this.setWarningText(warningText, WARNING_ID_FUNCTION_CHANGED);
708-
this.getIcon(Blockly.icons.IconType.WARNING).setBubbleVisible(true);
708+
this.getIcon(Blockly.icons.IconType.WARNING)!.setBubbleVisible(true);
709709
this.bringToFront();
710710
} else {
711711
// Clear the existing warning on the block.

src/blocks/mrc_event.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ const EVENT = {
207207
// If we end up here it shouldn't be allowed
208208
block.unplug(true);
209209
blockBlock.setWarningText('Events can only go in the events section of the robot or mechanism');
210-
blockBlock.getIcon(Blockly.icons.IconType.WARNING).setBubbleVisible(true);
210+
blockBlock.getIcon(Blockly.icons.IconType.WARNING)!.setBubbleVisible(true);
211211
}
212212
},
213213
getEvent: function (this: EventBlock): commonStorage.Event {

src/blocks/mrc_event_handler.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ const EVENT_HANDLER = {
204204
// Add a warnings to the block.
205205
const warningText = warnings.join('\n\n');
206206
this.setWarningText(warningText, WARNING_ID_EVENT_CHANGED);
207-
this.getIcon(Blockly.icons.IconType.WARNING).setBubbleVisible(true);
207+
this.getIcon(Blockly.icons.IconType.WARNING)!.setBubbleVisible(true);
208208
this.bringToFront();
209209
} else {
210210
// Clear the existing warning on the block.

src/blocks/mrc_get_parameter.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ const GET_PARAMETER_BLOCK = {
9090
// If we end up here it shouldn't be allowed
9191
block.unplug(true);
9292
blockBlock.setWarningText(Blockly.Msg.PARAMETERS_CAN_ONLY_GO_IN_THEIR_METHODS_BLOCK);
93-
blockBlock.getIcon(Blockly.icons.IconType.WARNING).setBubbleVisible(true);
93+
blockBlock.getIcon(Blockly.icons.IconType.WARNING)!.setBubbleVisible(true);
9494
}
9595
},
9696
};

src/blocks/mrc_mechanism.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ const MECHANISM = {
210210
// Add a warnings to the block.
211211
const warningText = warnings.join('\n\n');
212212
this.setWarningText(warningText, WARNING_ID_MECHANISM_CHANGED);
213-
this.getIcon(Blockly.icons.IconType.WARNING).setBubbleVisible(true);
213+
this.getIcon(Blockly.icons.IconType.WARNING)!.setBubbleVisible(true);
214214
this.bringToFront();
215215
} else {
216216
// Clear the existing warning on the block.

0 commit comments

Comments
 (0)