Skip to content

Commit cb38548

Browse files
committed
Fix place where we were passing an Array[string] to CodeMirror.findModeByExtension instead of passing a string. (I guess older versions of CodeMirror allowed this?)
1 parent 99fc8da commit cb38548

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

notebook/static/base/js/utils.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -754,7 +754,7 @@ define([
754754
// .mime
755755
var info = (mode && mode.mode && mode.mime && mode) ||
756756
CodeMirror.findModeByName(modename) ||
757-
CodeMirror.findModeByExtension(modename.split(".").slice(-1)) ||
757+
CodeMirror.findModeByExtension(modename.split(".").slice(-1)[0]) ||
758758
CodeMirror.findModeByMIME(modename) ||
759759
{mode: modename, mime: modename};
760760

0 commit comments

Comments
 (0)