mirror of
https://github.com/google/blockly.git
synced 2026-01-07 09:00:11 +01:00
chore: remove AnyDuringMigration from events (#6382)
* chore: remove AnyDuringMigration from events * chore: format * chore: lint * chore: fix tests * fix: correct types for JSON properties * chore: fix tests * refactor: replace exclamation markers with errors * chore: fix build and tests * chore: set event types as members, rather than in constructor * chore: update comment * chore: export new types * chore: format * chore: remove unnecessary override * chore: change how we're overriding isBlank * chore: remove unnecessary ? * chore: remove non-null assertion in block move event * chore: format * chore: revert changes to isNull * chore: format
This commit is contained in:
@@ -147,16 +147,16 @@ function extractObjectFromEvent(
|
||||
switch (e.type) {
|
||||
case eventUtils.BLOCK_CREATE:
|
||||
case eventUtils.BLOCK_MOVE:
|
||||
object = workspace.getBlockById((e as BlockCreate | BlockMove).blockId);
|
||||
object = workspace.getBlockById((e as BlockCreate | BlockMove).blockId!);
|
||||
if (object) {
|
||||
object = object.getRootBlock();
|
||||
}
|
||||
break;
|
||||
case eventUtils.COMMENT_CREATE:
|
||||
case eventUtils.COMMENT_MOVE:
|
||||
object = workspace.getCommentById(
|
||||
(e as CommentCreate | CommentMove).commentId) as
|
||||
WorkspaceCommentSvg |
|
||||
object =
|
||||
workspace.getCommentById((e as CommentCreate | CommentMove).commentId!
|
||||
) as WorkspaceCommentSvg |
|
||||
null;
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user