Show More
@@ -100,8 +100,11 b' function($,' | |||
|
100 | 100 | |
|
101 | 101 | // Find and load the highlighting mode, |
|
102 | 102 | // first by mime-type, then by file extension |
|
103 | var modeinfo = CodeMirror.findModeByMIME(model.mimetype); | |
|
104 |
if (mode |
|
|
103 | var modeinfo; | |
|
104 | if (model.mimetype) { | |
|
105 | modeinfo = CodeMirror.findModeByMIME(model.mimetype); | |
|
106 | } | |
|
107 | if (!modeinfo || modeinfo.mode === "null") { | |
|
105 | 108 | // find by mime failed, use find by ext |
|
106 | 109 | var ext_idx = model.name.lastIndexOf('.'); |
|
107 | 110 |
General Comments 0
You need to be logged in to leave comments.
Login now