Skip to content

Commit

Permalink
Merge pull request #28 from J3QQ4/patch-1
Browse files Browse the repository at this point in the history
Fix #25
  • Loading branch information
bomsy authored Jul 19, 2016
2 parents a442ebd + af1e75f commit 5e7b162
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,12 @@ define(function (require, exports, module) {
return;
}

if (mFile._contents === null || oFile._contents === null) {
notifier.error('To compare files, please open the folder containing these files in Brackets using the pane on the left.');
Logger.error('To compare files, please open the folder containing these files in Brackets using the pane on the left.');
return;
}

if (getExtension(mFile._name) !== getExtension(oFile._name)) {
notifier.error('Cannot compare files of different types. Please select files of the same type.');
Logger.error('Cannot compare files of different types. Please select files of the same type.');
Expand Down Expand Up @@ -152,4 +158,4 @@ define(function (require, exports, module) {
// Create a new panel to hold the diff views
comparePanel = WorkspaceManager.createBottomPanel("compare.panel", $(COMPARE_PANEL_HTML), 1000);
});
});
});

0 comments on commit 5e7b162

Please sign in to comment.