Skip to content

Commit 19758b7

Browse files
author
Steve Orvell
committed
Merge pull request #1838 from trevordixon/patch-1
Use var keyword when declaring local variable so it doesn't leak to global scope.
2 parents 44e807c + 0bc4e44 commit 19758b7

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/lib/style-properties.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@
270270
applyElementScopeSelector: function(element, selector, old, viaAttr) {
271271
var c = viaAttr ? element.getAttribute(styleTransformer.SCOPE_NAME) :
272272
element.className;
273-
v = old ? c.replace(old, selector) :
273+
var v = old ? c.replace(old, selector) :
274274
(c ? c + ' ' : '') + this.XSCOPE_NAME + ' ' + selector;
275275
if (c !== v) {
276276
if (viaAttr) {

src/standard/x-styling.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@
8181
var globalCached = Boolean(info) && !scopeCached;
8282
// now we have properties and a cached style if one
8383
// is available.
84-
style = this._applyStyleProperties(info);
84+
var style = this._applyStyleProperties(info);
8585
// no cache so store in cache
8686
//console.warn(this, scopeCached, globalCached, info && info._scopeSelector);
8787
if (!scopeCached) {

0 commit comments

Comments
 (0)