guard against missing session

This commit is contained in:
nightwing 2015-04-17 02:53:34 +04:00
parent c6e27314e9
commit 23935bae6d

View File

@ -1223,7 +1223,7 @@ define(function(require, exports, module) {
tabs.getTabs().forEach(function(tab) {
if (tab.editorType == "ace") {
var c9Session = tab.document.getSession();
if (c9Session.session)
if (c9Session && c9Session.session)
detectSyntax(c9Session, tab.path);
}
});