mirror of
https://github.com/klaussilveira/gitlist.git
synced 2025-11-18 03:30:55 +01:00
Fixed javascript error "b is null" in codemirror.js on line 1.
This commit is contained in:
@@ -1,12 +1,14 @@
|
|||||||
$(function () {
|
$(function () {
|
||||||
$('.dropdown-toggle').dropdown();
|
$('.dropdown-toggle').dropdown();
|
||||||
var mode = $('#sourcecode').attr('language');
|
|
||||||
|
|
||||||
CodeMirror.fromTextArea(document.getElementById("sourcecode"), {
|
if ($('#sourcecode').length) {
|
||||||
lineNumbers: true,
|
var mode = $('#sourcecode').attr('language');
|
||||||
matchBrackets: true,
|
CodeMirror.fromTextArea(document.getElementById("sourcecode"), {
|
||||||
lineWrapping: true,
|
lineNumbers: true,
|
||||||
readOnly: true,
|
matchBrackets: true,
|
||||||
mode: mode
|
lineWrapping: true,
|
||||||
});
|
readOnly: true,
|
||||||
});
|
mode: mode
|
||||||
|
});
|
||||||
|
};
|
||||||
|
});
|
||||||
Reference in New Issue
Block a user