From f27521d3eae41f669da42e47bcbdeabb5472d118 Mon Sep 17 00:00:00 2001 From: Eric Krona Date: Wed, 15 Feb 2012 08:28:39 -0500 Subject: [PATCH] Fix check of existing codemirror editor when running in AJAX mode --- js/functions.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/functions.js b/js/functions.js index ceb8e80f22..ae702d31ae 100644 --- a/js/functions.js +++ b/js/functions.js @@ -367,8 +367,8 @@ function checkSqlQuery(theForm) { // First check if codemirror is active. - if (typeof(CodeMirror)!='undefined') { - theForm.elements['sql_query'].value = CodeMirror.getValue(); + if (codemirror_editor) { + theForm.elements['sql_query'].value = codemirror_editor.getValue(); } var sqlQuery = theForm.elements['sql_query'];