From a0b83b259f23277419ef1b71bb8dc19093dd20a4 Mon Sep 17 00:00:00 2001 From: Daniel Freedman Date: Fri, 3 May 2019 16:27:54 -0700 Subject: [PATCH] Fix class$ bindings for ShadyDOM.noPatch mode --- lib/mixins/properties-changed.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/mixins/properties-changed.js b/lib/mixins/properties-changed.js index 94147a436c..b81844b828 100644 --- a/lib/mixins/properties-changed.js +++ b/lib/mixins/properties-changed.js @@ -497,12 +497,12 @@ export const PropertiesChanged = dedupingMixin( */ _valueToNodeAttribute(node, value, attribute) { const str = this._serializeValue(value); + if (attribute === 'class' || attribute === 'name' || attribute === 'slot') { + node = /** @type {?Element} */(wrap(node)); + } if (str === undefined) { node.removeAttribute(attribute); } else { - if (attribute === 'class' || attribute === 'name' || attribute === 'slot') { - node = /** @type {?Element} */(wrap(node)); - } node.setAttribute(attribute, str); } }