Skip to content

Commit 6f68652

Browse files
author
Benjamin Lichtman
committed
Only include attribute span if one or more
1 parent 3ca4c23 commit 6f68652

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/services/outliningElementsCollector.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,10 @@ namespace ts.OutliningElementsCollector {
198198
}
199199

200200
function spanForJSXAttributes(node: JsxAttributes): OutliningSpan | undefined {
201+
if (node.properties.length === 0) {
202+
return undefined;
203+
}
204+
201205
return createOutliningSpanFromBounds(node.getStart(), node.getEnd(), OutliningSpanKind.Code);
202206
}
203207

0 commit comments

Comments
 (0)