Skip to content

Commit a0b83b2

Browse files
committed
Fix class$ bindings for ShadyDOM.noPatch mode
1 parent 969f289 commit a0b83b2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/mixins/properties-changed.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -497,12 +497,12 @@ export const PropertiesChanged = dedupingMixin(
497497
*/
498498
_valueToNodeAttribute(node, value, attribute) {
499499
const str = this._serializeValue(value);
500+
if (attribute === 'class' || attribute === 'name' || attribute === 'slot') {
501+
node = /** @type {?Element} */(wrap(node));
502+
}
500503
if (str === undefined) {
501504
node.removeAttribute(attribute);
502505
} else {
503-
if (attribute === 'class' || attribute === 'name' || attribute === 'slot') {
504-
node = /** @type {?Element} */(wrap(node));
505-
}
506506
node.setAttribute(attribute, str);
507507
}
508508
}

0 commit comments

Comments
 (0)