aboutsummaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorAnanya Sen2012-02-21 17:41:55 -0800
committerAnanya Sen2012-02-21 17:41:55 -0800
commit9aa442da1ac9fd3212b37fa63a36090af47b6808 (patch)
treee5fdefbafc819741b93f0f4059093e00c4239362 /js
parent539fb19b2327a9f6fb39403e27c29a8f8d733198 (diff)
downloadninja-9aa442da1ac9fd3212b37fa63a36090af47b6808.tar.gz
fix bug when closing the first document tab
Signed-off-by: Ananya Sen <Ananya.Sen@motorola.com>
Diffstat (limited to 'js')
-rwxr-xr-xjs/controllers/document-controller.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/js/controllers/document-controller.js b/js/controllers/document-controller.js
index 505daaba..7470bae2 100755
--- a/js/controllers/document-controller.js
+++ b/js/controllers/document-controller.js
@@ -309,7 +309,7 @@ var DocumentController = exports.DocumentController = Montage.create(Component,
309 if(this.activeDocument.uuid === id && this._documents.length > 0) {//closing the active document tab 309 if(this.activeDocument.uuid === id && this._documents.length > 0) {//closing the active document tab
310 var nextDocumentIndex = -1 ; 310 var nextDocumentIndex = -1 ;
311 if((this._documents.length > 0) && (closeDocumentIndex === 0)){ 311 if((this._documents.length > 0) && (closeDocumentIndex === 0)){
312 nextDocumentIndex = 1; 312 nextDocumentIndex = 0;
313 }else if((this._documents.length > 0) && (closeDocumentIndex > 0)){ 313 }else if((this._documents.length > 0) && (closeDocumentIndex > 0)){
314 nextDocumentIndex = closeDocumentIndex - 1; 314 nextDocumentIndex = closeDocumentIndex - 1;
315 } 315 }