mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-14 09:49:40 -05:00
Only include attribute span if one or more
This commit is contained in:
@@ -198,6 +198,10 @@ namespace ts.OutliningElementsCollector {
|
||||
}
|
||||
|
||||
function spanForJSXAttributes(node: JsxAttributes): OutliningSpan | undefined {
|
||||
if (node.properties.length === 0) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
return createOutliningSpanFromBounds(node.getStart(), node.getEnd(), OutliningSpanKind.Code);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user