Skip to content

Commit fd7a6c5

Browse files
committed
fix: don't complete in invalid positions
1 parent 537286b commit fd7a6c5

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

typescript/src/completions/boostNameSuggestions.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,11 @@ export default (
2222
}
2323
const statementsNode = nodeWithStatements(node) || nodeWithStatements(node.parent)
2424
// Workaround for current locality bonus & TS 5.1
25-
if (statementsNode) {
25+
if (
26+
statementsNode &&
27+
// ensure completions are not blocked
28+
entries.length > 0
29+
) {
2630
const statements = statementsNode.statements as any[]
2731
const prevNode =
2832
statementsNode === node

0 commit comments

Comments
 (0)