diff --git a/js/console.js b/js/console.js index 7601768ec6..ee92067ac4 100644 --- a/js/console.js +++ b/js/console.js @@ -550,7 +550,7 @@ var PMA_consoleInput = { cursorLine = text.substr(0, editor.prop("selectionStart")).split("\n").length - 1; totalLine = text.split(/\r*\n/).length; } - if (cursorLine == 0) { + if (cursorLine === 0) { upPermitted = true; } if (cursorLine == totalLine - 1) { @@ -560,7 +560,7 @@ var PMA_consoleInput = { var queryString = false; if (upPermitted && event.keyCode == 38) { // Navigate up in history - if (PMA_consoleInput._historyCount == 0) { + if (PMA_consoleInput._historyCount === 0) { PMA_consoleInput._historyPreserveCurrent = PMA_consoleInput.getText(); } nextCount = PMA_consoleInput._historyCount + 1; @@ -568,11 +568,11 @@ var PMA_consoleInput = { } else if (downPermitted && event.keyCode == 40) { // Navigate down in history - if (PMA_consoleInput._historyCount == 0) { + if (PMA_consoleInput._historyCount === 0) { return; } nextCount = PMA_consoleInput._historyCount - 1; - if (nextCount == 0) { + if (nextCount === 0) { queryString = PMA_consoleInput._historyPreserveCurrent; } else { @@ -721,10 +721,11 @@ var PMA_consoleMessages = { var $queries = $('#pma_console .content .console_message_container .query'); var length = $queries.length; var $query = $queries.eq(length - nthLast); - if (!$query || (length - nthLast) < 0) + if (!$query || (length - nthLast) < 0) { return false; - else + } else { return $query.text(); + } }, /** * Used for log new message