From 44903a3b55b4343f26de7cc4c60a2723e3131793 Mon Sep 17 00:00:00 2001 From: Eric Guzman Date: Fri, 29 Jun 2012 09:09:56 -0700 Subject: Styles Controller Patch to ignore unfound rules from getMatchedCSSRules --- js/controllers/styles-controller.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/js/controllers/styles-controller.js b/js/controllers/styles-controller.js index 0f847653..2282794c 100755 --- a/js/controllers/styles-controller.js +++ b/js/controllers/styles-controller.js @@ -629,7 +629,7 @@ var stylesController = exports.StylesController = Montage.create(Component, { if(!rule) { ///// This should never be hit if providing cssText from existing rule (like those ///// returned from getMatchedCSSRules() - console.warn('StylesController::_getRuleWithCSSText - No rule found with given cssText.'); + //console.warn('StylesController::_getRuleWithCSSText - No rule found with given cssText.'); } return rule; @@ -653,6 +653,8 @@ var stylesController = exports.StylesController = Montage.create(Component, { }, this); rules = mappedRules.filter(function(rule) { + if(!rule) { return false; } + //// useStageStyleSheet flag indicates whether to only return rules from the stylesheet, //// or only use rules for other stylesheets -- cgit v1.2.3