diff --git a/index.html b/index.html
index fb0107e28..f0e4686c4 100644
--- a/index.html
+++ b/index.html
@@ -264,7 +264,7 @@
var default_text = "// This is just a sample script. Paste your real code (javascript or HTML) here.\n\nif ('this_is'==/an_example/){of_beautifer();}else{var a=b?(c%d):e[f];}";
- if (the.use_codemirror) {
+ if (the.use_codemirror && typeof CodeMirror !== 'undefined') {
the.editor = CodeMirror.fromTextArea($('#source').get(0))
the.editor.setValue(default_text);
$('.CodeMirror').click(function () {