From 42e1fc1533941c86b6f1017cf899ca41f29dbb06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Thu, 2 Jun 2011 17:01:17 +0200 Subject: [PATCH] Fix detection whether there is SQL editor to handle --- js/functions.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/functions.js b/js/functions.js index a8595a157e..fdae296e8c 100644 --- a/js/functions.js +++ b/js/functions.js @@ -2396,7 +2396,7 @@ $(document).ready(function() { */ $(document).ready(function() { var elm = $('#sqlquery'); - if (elm) { + if (elm.length > 0) { codemirror_editor = CodeMirror.fromTextArea(elm[0], {lineNumbers: true, matchBrackets: true, indentUnit: 4, mode: "text/x-mysql"}); } })