Skip to content

Commit 6fd0e1f

Browse files
committed
A little more dry.
1 parent 4aa8da2 commit 6fd0e1f

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/lib/annotations/annotations.html

+2-5
Original file line numberDiff line numberDiff line change
@@ -278,11 +278,8 @@
278278
content.setAttribute(attr.name, attr.value);
279279
}
280280
var name = slot.getAttribute('name');
281-
if (name) {
282-
content.setAttribute('select', '[slot=\'' + name + '\']');
283-
} else {
284-
content.setAttribute('select', ':not([slot])');
285-
}
281+
var select = name ? '[slot=\'' + name + '\']' : ':not([slot])';
282+
content.setAttribute('select', select);
286283
slot.parentNode.replaceChild(content, slot);
287284
return content;
288285
},

0 commit comments

Comments
 (0)