From a00c932bbc5a76ba9b0457d7d20cd1d5fc185b3d Mon Sep 17 00:00:00 2001 From: Unknwon Date: Tue, 16 Aug 2016 23:06:38 -0700 Subject: General code quality improvement --- public/config.codekit | 2 +- public/js/gogs.js | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) (limited to 'public') diff --git a/public/config.codekit b/public/config.codekit index 018919d3b8..5faa5569f1 100644 --- a/public/config.codekit +++ b/public/config.codekit @@ -137,7 +137,7 @@ "outputPathIsOutsideProject": 0, "outputPathIsSetByUser": 0, "outputStyle": 1, - "syntaxCheckerStyle": 1 + "syntaxCheckerStyle": 0 }, "\/js\/jquery-1.11.3.min.js": { "fileType": 64, diff --git a/public/js/gogs.js b/public/js/gogs.js index 0e18eea4db..677598753c 100644 --- a/public/js/gogs.js +++ b/public/js/gogs.js @@ -736,7 +736,6 @@ function initEditor() { }).trigger('keyup'); editArea = $('.repository.editor textarea#edit_area'); - if (!editArea.length) return; @@ -779,9 +778,8 @@ function initEditor() { } // Else we are going to use CodeMirror - if (!cmEditor) { - if (!setCodeMirror()) - return; + if (!cmEditor && !setCodeMirror()) { + return; } if (mode) { -- cgit v1.2.3