From 86996190d6a4dd59343d4ce482a9c0e6ef0f1eac Mon Sep 17 00:00:00 2001 From: Ananya Sen Date: Tue, 21 Feb 2012 15:53:37 -0800 Subject: added null check for matchedRules in styles-controller.js, to fix js error on reopening and edited html document Signed-off-by: Ananya Sen --- js/controllers/styles-controller.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'js') diff --git a/js/controllers/styles-controller.js b/js/controllers/styles-controller.js index 885d710f..31beb6d0 100755 --- a/js/controllers/styles-controller.js +++ b/js/controllers/styles-controller.js @@ -317,7 +317,11 @@ var stylesController = exports.StylesController = Montage.create(Component, { isInlineStyle : true, style : element.style }; - + + if((typeof matchedRules === "undefined") || (matchedRules === null)){ + return null; + } + ///// Now splice it into the matched rules ///// By inserting the inline style at the beginning, ///// we keep the correct order of specificity -- cgit v1.2.3