diff options
Diffstat (limited to 'js')
-rwxr-xr-x | js/controllers/document-controller.js | 2 |
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 | } |