Skip to content
Snippets Groups Projects
Commit 9607bf23 authored by damjan's avatar damjan
Browse files

[BUGFIX] Don't load codeMirror if there is no textAreas

parent 4ecabbeb
No related branches found
No related tags found
No related merge requests found
......@@ -39,5 +39,9 @@ window.onload = function () {
}
// CodeMirror
var myCodeMirror = CodeMirror.fromTextArea(document.getElementById('description'), {mode: 'markdown'});
var descriptionTexArea = document.getElementById('description');
var myCodeMirror;
if (descriptionTexArea) {
myCodeMirror = CodeMirror.fromTextArea(descriptionTexArea, {mode: 'markdown'});
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment