diff options
author | Ananya Sen | 2012-07-25 12:29:16 -0700 |
---|---|---|
committer | Ananya Sen | 2012-07-25 12:29:16 -0700 |
commit | e7509af2b2fad6ab23ea07e6e46e88a4ee0d03f1 (patch) | |
tree | 8a180716f60bf87073233732753da65711c28732 /js/code-editor | |
parent | fa2e82cf10aaa4900a462410cbb99b5b0433a1b1 (diff) | |
download | ninja-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')
-rw-r--r-- | js/code-editor/ui/code-editor-view-options.reel/code-editor-view-options.js | 2 |
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; |