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