Only include attribute span if one or more

This commit is contained in:
Benjamin Lichtman
2018-06-29 17:10:35 -07:00
parent 3ca4c23e4c
commit 6f68652f2a

View File

@@ -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);
}