Skip to content

Commit

Permalink
Fix global leak of style reference and add 'use strict'; to avoid…
Browse files Browse the repository at this point in the history
… in the future.
  • Loading branch information
Steven Orvell committed Jun 12, 2015
1 parent 19758b7 commit 7760069
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/lib/style-properties.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
<script>

Polymer.StyleProperties = (function() {
'use strict';

var nativeShadow = Polymer.Settings.useNativeShadow;
var matchesSelector = Polymer.DomApi.matchesSelector;
Expand Down
3 changes: 2 additions & 1 deletion src/standard/x-styling.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
<link rel="import" href="../lib/style-cache.html">
<script>
(function() {
'use strict';

var serializeValueToAttribute = Polymer.Base.serializeValueToAttribute;

Expand Down Expand Up @@ -151,7 +152,7 @@
// note, the scope selector is incremented per class counter
this._scopeSelector = info ? info._scopeSelector :
this.is + '-' + this.__proto__._scopeCount++;
style = propertyUtils.applyElementStyle(this,
var style = propertyUtils.applyElementStyle(this,
this._styleProperties, this._scopeSelector, info && info.style);
// apply scope selector (iff we have some scoped css)
if ((style || oldScopeSelector) && !nativeShadow) {
Expand Down

0 comments on commit 7760069

Please sign in to comment.