Skip to content

Commit

Permalink
Fix javascript error when codemirror is disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
dirkjanm committed Aug 6, 2013
1 parent ca2cc11 commit 97849db
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions js/functions.js
Original file line number Diff line number Diff line change
Expand Up @@ -1501,8 +1501,10 @@ function PMA_highlightSQL(base)
if ($pre.is(":visible")) {
var $highlight = $('<div class="sql-highlight cm-s-default"></div>');
$sql.append($highlight);
CodeMirror.runMode($sql.text(), 'text/x-mysql', $highlight[0]);
$pre.hide();
if (typeof CodeMirror != 'undefined') {
CodeMirror.runMode($sql.text(), 'text/x-mysql', $highlight[0]);
$pre.hide();
}
}
});
}
Expand Down

0 comments on commit 97849db

Please sign in to comment.