aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Guzman2012-05-21 15:42:24 -0700
committerEric Guzman2012-05-21 15:42:24 -0700
commit022164517cafa5f75f6d3e5eed250ae1500f898a (patch)
treec6b3309fddcf59346342f2a4fd8734cc5d4c1cc9
parenta48b284e902708685ab892b273538eb8ba65e496 (diff)
downloadninja-022164517cafa5f75f6d3e5eed250ae1500f898a.tar.gz
Style Sheets - Fix error on opening new document (without refresh)
-rw-r--r--js/panels/css-panel/style-sheets-view.reel/style-sheets-view.js10
1 files changed, 6 insertions, 4 deletions
diff --git a/js/panels/css-panel/style-sheets-view.reel/style-sheets-view.js b/js/panels/css-panel/style-sheets-view.reel/style-sheets-view.js
index 11b1d19c..5081a124 100644
--- a/js/panels/css-panel/style-sheets-view.reel/style-sheets-view.js
+++ b/js/panels/css-panel/style-sheets-view.reel/style-sheets-view.js
@@ -62,10 +62,12 @@ exports.StyleSheetsView = Montage.create(Component, {
62 62
63 if(this.styleSheetList) { 63 if(this.styleSheetList) {
64 sheetComponent = this.styleSheetList.childComponents[this.styleSheets.indexOf(sheet)]; 64 sheetComponent = this.styleSheetList.childComponents[this.styleSheets.indexOf(sheet)];
65 sheetComponent.default = true; 65 if(sheetComponent) {
66 if(this._defaultStyleSheet) { 66 sheetComponent.default = true;
67 oldDefaultSheet = this.styleSheetList.childComponents[this.styleSheets.indexOf(this._defaultStyleSheet)]; 67 if(this._defaultStyleSheet) {
68 oldDefaultSheet.default = false; 68 oldDefaultSheet = this.styleSheetList.childComponents[this.styleSheets.indexOf(this._defaultStyleSheet)];
69 oldDefaultSheet.default = false;
70 }
69 } 71 }
70 } 72 }
71 73