aboutsummaryrefslogtreecommitdiff
path: root/js/code-editor/ui
diff options
context:
space:
mode:
authorAnanya Sen2012-07-25 12:29:16 -0700
committerAnanya Sen2012-07-25 12:29:16 -0700
commite7509af2b2fad6ab23ea07e6e46e88a4ee0d03f1 (patch)
tree8a180716f60bf87073233732753da65711c28732 /js/code-editor/ui
parentfa2e82cf10aaa4900a462410cbb99b5b0433a1b1 (diff)
downloadninja-e7509af2b2fad6ab23ea07e6e46e88a4ee0d03f1.tar.gz
adding null check for currentDocument to prevent error
Signed-off-by: Ananya Sen <Ananya.Sen@motorola.com>
Diffstat (limited to 'js/code-editor/ui')
-rw-r--r--js/code-editor/ui/code-editor-view-options.reel/code-editor-view-options.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/js/code-editor/ui/code-editor-view-options.reel/code-editor-view-options.js b/js/code-editor/ui/code-editor-view-options.reel/code-editor-view-options.js
index 70d033fb..2ca6118b 100644
--- a/js/code-editor/ui/code-editor-view-options.reel/code-editor-view-options.js
+++ b/js/code-editor/ui/code-editor-view-options.reel/code-editor-view-options.js
@@ -53,7 +53,7 @@ exports.CodeEditorViewOptions = Montage.create(Component, {
53 53
54 if(!value || (this._currentDocument.currentView === "design")) { 54 if(!value || (this._currentDocument.currentView === "design")) {
55 this.visible = false; 55 this.visible = false;
56 } else if(this._currentDocument.currentView === "code") { 56 } else if(this._currentDocument && this._currentDocument.currentView === "code") {
57 57
58 if(this._currentDocument.model.views.design){//code view of design document 58 if(this._currentDocument.model.views.design){//code view of design document
59 this.application.ninja.editorViewOptions.visible = false; 59 this.application.ninja.editorViewOptions.visible = false;