From 6f68652f2a72283339fd596e179fd625dfc13fac Mon Sep 17 00:00:00 2001 From: Benjamin Lichtman Date: Fri, 29 Jun 2018 17:10:35 -0700 Subject: [PATCH] Only include attribute span if one or more --- src/services/outliningElementsCollector.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/services/outliningElementsCollector.ts b/src/services/outliningElementsCollector.ts index d9d6fb6640a..3048d1a5e33 100644 --- a/src/services/outliningElementsCollector.ts +++ b/src/services/outliningElementsCollector.ts @@ -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); }