mirror of
https://github.com/jupyter/notebook.git
synced 2025-01-30 12:11:32 +08:00
only set codemirror mode if it exists
This commit is contained in:
parent
a2f6a8c3bb
commit
97f4913c16
@ -61,7 +61,9 @@ function(
|
||||
var modename = cfg.file_extension_modes[that._get_file_extension()];
|
||||
if (modename) {
|
||||
var modeinfo = CodeMirror.findModeByName(modename);
|
||||
that.set_codemirror_mode(modeinfo);
|
||||
if (modeinfo) {
|
||||
that.set_codemirror_mode(modeinfo);
|
||||
}
|
||||
}
|
||||
}
|
||||
that._clean_state();
|
||||
|
Loading…
Reference in New Issue
Block a user