Skip to content

Commit

Permalink
Fix keyboard broken by #2235
Browse files Browse the repository at this point in the history
This was not caught by our tests because we mock away command server. Not sure how to prevent this sort of thing in the future
  • Loading branch information
pokey committed Apr 26, 2024
1 parent a1bb6e4 commit afc990f
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions packages/cursorless-engine/src/core/getCommandFallback.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,9 @@ export async function getCommandFallback(
runAction: (actionDescriptor: ActionDescriptor) => Promise<ActionReturnValue>,
command: CommandComplete,
): Promise<Fallback | null> {
if (
commandServerApi == null ||
(await commandServerApi.getFocusedElementType()) === "textEditor"
) {
const focusedElementType = await commandServerApi?.getFocusedElementType();

if (focusedElementType == null || focusedElementType === "textEditor") {
return null;
}

Expand Down

0 comments on commit afc990f

Please sign in to comment.