mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-13 16:34:39 -06:00
Add nullcheck when calculating indentations for implort clause
This commit is contained in:
parent
b5247959e9
commit
7232513194
@ -497,7 +497,7 @@ namespace ts.formatting {
|
||||
return childKind !== SyntaxKind.NamedExports;
|
||||
case SyntaxKind.ImportDeclaration:
|
||||
return childKind !== SyntaxKind.ImportClause ||
|
||||
(<ImportClause>child).namedBindings.kind !== SyntaxKind.NamedImports;
|
||||
((<ImportClause>child).namedBindings && (<ImportClause>child).namedBindings.kind !== SyntaxKind.NamedImports);
|
||||
case SyntaxKind.JsxElement:
|
||||
return childKind !== SyntaxKind.JsxClosingElement;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user