Skip to content

Commit

Permalink
fix jslint
Browse files Browse the repository at this point in the history
  • Loading branch information
couzteau committed Oct 26, 2013
1 parent 94a0709 commit dd2557e
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/document/DocumentCommandHandlers.js
Original file line number Diff line number Diff line change
Expand Up @@ -854,13 +854,15 @@ define(function (require, exports, module) {
}
}

var result = new $.Deferred(), promise = result.promise();

function doCloseCustomViewer() {
if (!promptOnly) {
var nextFile = DocumentManager.getNextPrevFile(1);
if (nextFile) {
// opening a text file will automatically close the custom viewer.
// This is done in the currentDocumentChange handler in EditorManager
doOpen(nextFile.fullPath).always(function() {
doOpen(nextFile.fullPath).always(function () {
EditorManager.focusEditor();
result.resolve();
});
Expand All @@ -870,17 +872,15 @@ define(function (require, exports, module) {
}
}
}

var result = new $.Deferred(), promise = result.promise();


// Close custom viewer if necessary
if (!DocumentManager.getCurrentDocument() && EditorManager.getCurrentlyViewedPath()) {
//_customViewerIsDisplayed = true;
// if there is no doc a custom viewer is displayed
if(!file || file.fullPath === EditorManager.getCurrentlyViewedPath()){
if (!file || file.fullPath === EditorManager.getCurrentlyViewedPath()) {
doCloseCustomViewer();
return promise;
}else{
} else {
result.resolve();
return promise;
}
Expand Down

0 comments on commit dd2557e

Please sign in to comment.