mirror of
https://github.com/jupyter/notebook.git
synced 2024-12-27 04:20:22 +08:00
Merge pull request #7516 from minrk/empty-language-info
don't set language_info to an empty dict
This commit is contained in:
commit
bfc9908b75
@ -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';
|
||||
|
Loading…
Reference in New Issue
Block a user