From 0bc4e445bdf59aad0eb539c52b3f76267600aaf4 Mon Sep 17 00:00:00 2001 From: Trevor Dixon Date: Thu, 11 Jun 2015 12:45:31 -0700 Subject: [PATCH] Use var keyword when declaring local variable so it doesn't leak to global scope. --- src/lib/style-properties.html | 2 +- src/standard/x-styling.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/style-properties.html b/src/lib/style-properties.html index dd1e44d45a..b2e1767ed6 100644 --- a/src/lib/style-properties.html +++ b/src/lib/style-properties.html @@ -270,7 +270,7 @@ applyElementScopeSelector: function(element, selector, old, viaAttr) { var c = viaAttr ? element.getAttribute(styleTransformer.SCOPE_NAME) : element.className; - v = old ? c.replace(old, selector) : + var v = old ? c.replace(old, selector) : (c ? c + ' ' : '') + this.XSCOPE_NAME + ' ' + selector; if (c !== v) { if (viaAttr) { diff --git a/src/standard/x-styling.html b/src/standard/x-styling.html index 6364da51df..5b11ff9825 100644 --- a/src/standard/x-styling.html +++ b/src/standard/x-styling.html @@ -81,7 +81,7 @@ var globalCached = Boolean(info) && !scopeCached; // now we have properties and a cached style if one // is available. - style = this._applyStyleProperties(info); + var style = this._applyStyleProperties(info); // no cache so store in cache //console.warn(this, scopeCached, globalCached, info && info._scopeSelector); if (!scopeCached) {