Merge pull request #7516 from minrk/empty-language-info

don't set language_info to an empty dict
This commit is contained in:
Min RK 2015-01-20 16:12:21 -08:00
commit bfc9908b75

View File

@ -256,7 +256,11 @@ define([
this.events.on('kernel_ready.Kernel', function(event, data) {
var kinfo = data.kernel.info_reply;
var langinfo = kinfo.language_info || {};
if (!kinfo.language_info) {
delete that.metadata.language_info;
return;
}
var langinfo = kinfo.language_info;
that.metadata.language_info = langinfo;
// Mode 'null' should be plain, unhighlighted text.
var cm_mode = langinfo.codemirror_mode || langinfo.name || 'null';