mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-30 01:04:49 -05:00
JsxText has no leading comments
This commit is contained in:
@@ -635,7 +635,7 @@ namespace ts {
|
||||
}
|
||||
|
||||
export function getLeadingCommentRangesOfNode(node: Node, sourceFileOfNode: SourceFile) {
|
||||
return getLeadingCommentRanges(sourceFileOfNode.text, node.pos);
|
||||
return node.kind !== SyntaxKind.JsxText ? getLeadingCommentRanges(sourceFileOfNode.text, node.pos) : undefined;
|
||||
}
|
||||
|
||||
export function getLeadingCommentRangesOfNodeFromText(node: Node, text: string) {
|
||||
|
||||
Reference in New Issue
Block a user