From 6fd0e1ffaffd197955823df4d5c8257abc144b65 Mon Sep 17 00:00:00 2001 From: Kevin Schaaf Date: Wed, 21 Sep 2016 16:58:07 -0700 Subject: [PATCH] A little more dry. --- src/lib/annotations/annotations.html | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/lib/annotations/annotations.html b/src/lib/annotations/annotations.html index e6d56d0737..60cb07f676 100644 --- a/src/lib/annotations/annotations.html +++ b/src/lib/annotations/annotations.html @@ -278,11 +278,8 @@ content.setAttribute(attr.name, attr.value); } var name = slot.getAttribute('name'); - if (name) { - content.setAttribute('select', '[slot=\'' + name + '\']'); - } else { - content.setAttribute('select', ':not([slot])'); - } + var select = name ? '[slot=\'' + name + '\']' : ':not([slot])'; + content.setAttribute('select', select); slot.parentNode.replaceChild(content, slot); return content; },