mirror of
https://github.com/google/blockly.git
synced 2026-01-08 17:40:09 +01:00
chore: remove now-unneeded cast (#9016)
This commit is contained in:
@@ -155,8 +155,7 @@ export namespace ContextMenuRegistry {
|
||||
block?: BlockSvg;
|
||||
workspace?: WorkspaceSvg;
|
||||
comment?: RenderedWorkspaceComment;
|
||||
// TODO(#8839): Remove any once Block, etc. implement IFocusableNode
|
||||
focusedNode?: IFocusableNode | any;
|
||||
focusedNode?: IFocusableNode;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -253,7 +253,7 @@ export class ShortcutRegistry {
|
||||
!shortcut ||
|
||||
(shortcut.preconditionFn &&
|
||||
!shortcut.preconditionFn(workspace, {
|
||||
focusedNode: getFocusManager().getFocusedNode(),
|
||||
focusedNode: getFocusManager().getFocusedNode() ?? undefined,
|
||||
}))
|
||||
) {
|
||||
continue;
|
||||
@@ -261,10 +261,11 @@ export class ShortcutRegistry {
|
||||
// If the key has been handled, stop processing shortcuts.
|
||||
if (
|
||||
shortcut.callback?.(workspace, e, shortcut, {
|
||||
focusedNode: getFocusManager().getFocusedNode(),
|
||||
focusedNode: getFocusManager().getFocusedNode() ?? undefined,
|
||||
})
|
||||
)
|
||||
) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user