Skip to content

Commit 6ff08bd

Browse files
gonfunkoBenHenning
andauthored
refactor: Improve checking for ability to handle Enter.
Co-authored-by: Ben Henning <[email protected]>
1 parent 9c236bd commit 6ff08bd

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

src/actions/enter.ts

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -127,15 +127,10 @@ export class EnterAction {
127127
return !workspace.isReadOnly();
128128
}
129129
// Returning true is sometimes incorrect for icons, but there's no API to check.
130-
if (
131-
curNode instanceof BlockSvg ||
130+
return curNode instanceof BlockSvg ||
132131
curNode instanceof icons.Icon ||
133132
curNode instanceof comments.CommentBarButton ||
134-
curNode instanceof comments.RenderedWorkspaceComment
135-
) {
136-
return true;
137-
}
138-
return false;
133+
curNode instanceof comments.RenderedWorkspaceComment;
139134
}
140135

141136
/**

0 commit comments

Comments
 (0)