aboutsummaryrefslogtreecommitdiff
path: root/js/controllers/styles-controller.js
diff options
context:
space:
mode:
authorAnanya Sen2012-02-21 15:53:37 -0800
committerAnanya Sen2012-02-21 15:53:37 -0800
commit86996190d6a4dd59343d4ce482a9c0e6ef0f1eac (patch)
treece924d978a6b808cc94e1dc8829d3c294b42feb6 /js/controllers/styles-controller.js
parentadb90eff3323aa780f9a0879572e3cf3b9f0b969 (diff)
downloadninja-86996190d6a4dd59343d4ce482a9c0e6ef0f1eac.tar.gz
added null check for matchedRules in styles-controller.js, to fix js error on reopening and edited html document
Signed-off-by: Ananya Sen <Ananya.Sen@motorola.com>
Diffstat (limited to 'js/controllers/styles-controller.js')
-rwxr-xr-xjs/controllers/styles-controller.js6
1 files changed, 5 insertions, 1 deletions
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, {
317 isInlineStyle : true, 317 isInlineStyle : true,
318 style : element.style 318 style : element.style
319 }; 319 };
320 320
321 if((typeof matchedRules === "undefined") || (matchedRules === null)){
322 return null;
323 }
324
321 ///// Now splice it into the matched rules 325 ///// Now splice it into the matched rules
322 ///// By inserting the inline style at the beginning, 326 ///// By inserting the inline style at the beginning,
323 ///// we keep the correct order of specificity 327 ///// we keep the correct order of specificity