Skip to content

Commit 4e223b3

Browse files
committed
Fix for scoping when class is not specified on element (null was prepended instead of empty string)
1 parent 273ab0f commit 4e223b3

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/standard/x-styling.html

+4-4
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@
3535
},
3636

3737
/**
38-
* An element's style properties can be directly modified by
39-
* setting key-value pairs in `customStyle` on the element
38+
* An element's style properties can be directly modified by
39+
* setting key-value pairs in `customStyle` on the element
4040
* (analogous to setting `style`) and then calling `updateStyles()`.
4141
*
4242
*/
@@ -208,14 +208,14 @@
208208
}
209209
// note: using Polymer.dom here ensures that any attribute sets
210210
// will provoke distribution if necessary; do this iff necessary
211-
node = (this.shadyRoot && this.shadyRoot._hasDistributed) ?
211+
node = (this.shadyRoot && this.shadyRoot._hasDistributed) ?
212212
Polymer.dom(node) : node;
213213
serializeValueToAttribute.call(this, value, attribute, node);
214214
},
215215

216216
_scopeElementClass: function(element, selector) {
217217
if (!nativeShadow && !this._scopeCssViaAttr) {
218-
selector += (selector ? ' ' : '') + SCOPE_NAME + ' ' + this.is +
218+
selector = (selector ? selector + ' ' : '') + SCOPE_NAME + ' ' + this.is +
219219
(element._scopeSelector ? ' ' + XSCOPE_NAME + ' ' +
220220
element._scopeSelector : '');
221221
}

0 commit comments

Comments
 (0)