aboutsummaryrefslogtreecommitdiff
path: root/js/controllers/styles-controller.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/controllers/styles-controller.js')
-rwxr-xr-xjs/controllers/styles-controller.js10
1 files changed, 9 insertions, 1 deletions
diff --git a/js/controllers/styles-controller.js b/js/controllers/styles-controller.js
index 22f29bd8..c8b9376e 100755
--- a/js/controllers/styles-controller.js
+++ b/js/controllers/styles-controller.js
@@ -83,6 +83,11 @@ var stylesController = exports.StylesController = Montage.create(Component, {
83 ///// If the document is null set default stylesheets to null 83 ///// If the document is null set default stylesheets to null
84 84
85 if(!document) { 85 if(!document) {
86 this._activeDocument = null;
87 this._stageStylesheet = null;
88 this.defaultStylesheet = null;
89 this.userStyleSheets = [];
90 this.clearDirtyStyleSheets();
86 return false; 91 return false;
87 } 92 }
88 93
@@ -120,7 +125,10 @@ var stylesController = exports.StylesController = Montage.create(Component, {
120 if(sheet) { 125 if(sheet) {
121 this._defaultStylesheet = sheet; 126 this._defaultStylesheet = sheet;
122 } else { 127 } else {
123 128 if(sheet === null) {
129 this._defaultStylesheet = null;
130 return false;
131 }
124 ///// Use the last stylesheet in the document as the default 132 ///// Use the last stylesheet in the document as the default
125 133
126 var sheets = this._activeDocument._document.styleSheets, 134 var sheets = this._activeDocument._document.styleSheets,