Skip to content

Commit 984aaa3

Browse files
mjbvzAndy
authored and
Andy
committed
Fix completions and brace in empty file (microsoft#22620)
Fixes microsoft#22618
1 parent bfe755c commit 984aaa3

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

src/services/completions.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1628,7 +1628,7 @@ namespace ts.Completions {
16281628
}
16291629

16301630
function isFromClassElementDeclaration(node: Node) {
1631-
return isClassElement(node.parent) && isClassLike(node.parent.parent);
1631+
return node.parent && isClassElement(node.parent) && isClassLike(node.parent.parent);
16321632
}
16331633

16341634
function isParameterOfConstructorDeclaration(node: Node) {
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
/// <reference path='fourslash.ts'/>
2+
3+
////
4+
//// }/**/
5+
////
6+
7+
8+
goTo.marker();
9+
verify.not.completionListIsEmpty();

0 commit comments

Comments
 (0)