Skip to content

Commit

Permalink
Tell jQuery we're expecting JSON here
Browse files Browse the repository at this point in the history
It's better to be explicit rather than relying on autodetection.

Signed-off-by: Michal Čihař <michal@cihar.com>
  • Loading branch information
nijel committed Jan 19, 2016
1 parent 0a24f92 commit 1149689
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions js/codemirror/addon/lint/sql-lint.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@ CodeMirror.sqlLint = function(text, updateLinting, options, cm) {
return;
}

function handleResponse(json) {
response = JSON.parse(json);

function handleResponse(response) {
var found = [];
for (var idx in response) {
found.push({
Expand All @@ -29,6 +27,7 @@ CodeMirror.sqlLint = function(text, updateLinting, options, cm) {
$.ajax({
method: "POST",
url: "lint.php",
dataType: 'json',
data: {
sql_query: text,
token: PMA_commonParams.get('token'),
Expand Down

0 comments on commit 1149689

Please sign in to comment.