Skip to content

Commit

Permalink
slight optimization, avoid work if no cssText is set.
Browse files Browse the repository at this point in the history
  • Loading branch information
Steven Orvell committed May 23, 2016
1 parent 63f91ae commit ce0bf86
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/lib/style-properties.html
Original file line number Diff line number Diff line change
Expand Up @@ -417,8 +417,10 @@
if (!style) {
// apply css after the scope style of the element to help with
// style precedence rules.
style = styleUtil.applyCss(cssText, selector, null,
element._scopeStyle);
if (cssText) {
style = styleUtil.applyCss(cssText, selector, null,
element._scopeStyle);
}
// shady and cache hit but not in document
} else if (!style.parentNode) {
styleUtil.applyStyle(style, null, element._scopeStyle);
Expand Down

0 comments on commit ce0bf86

Please sign in to comment.