We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b524795 commit 7232513Copy full SHA for 7232513
1 file changed
src/services/formatting/smartIndenter.ts
@@ -497,7 +497,7 @@ namespace ts.formatting {
497
return childKind !== SyntaxKind.NamedExports;
498
case SyntaxKind.ImportDeclaration:
499
return childKind !== SyntaxKind.ImportClause ||
500
- (<ImportClause>child).namedBindings.kind !== SyntaxKind.NamedImports;
+ ((<ImportClause>child).namedBindings && (<ImportClause>child).namedBindings.kind !== SyntaxKind.NamedImports);
501
case SyntaxKind.JsxElement:
502
return childKind !== SyntaxKind.JsxClosingElement;
503
}
0 commit comments