From f721e110febd9ef95fd1b3d713541a3601cbb8c3 Mon Sep 17 00:00:00 2001 From: Max Schaefer Date: Tue, 23 May 2017 08:32:20 +0800 Subject: [PATCH] Fix two spurious self-comparisons. --- plugins/c9.ide.collab/ot/index_cache.js | 2 +- plugins/c9.ide.language.jsonalyzer/server/invoke_helper.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/c9.ide.collab/ot/index_cache.js b/plugins/c9.ide.collab/ot/index_cache.js index a13c5e8a..6187aae5 100644 --- a/plugins/c9.ide.collab/ot/index_cache.js +++ b/plugins/c9.ide.collab/ot/index_cache.js @@ -49,7 +49,7 @@ function IndexCache(doc) { if (check) { var slowPos = doc.indexToPositionSlow(index); - if (slowPos.row !== pos.row && slowPos.column !== slowPos.column) + if (slowPos.row !== pos.row && slowPos.column !== pos.column) reportError("Inconsistency in indexToPosition"); return slowPos; } diff --git a/plugins/c9.ide.language.jsonalyzer/server/invoke_helper.js b/plugins/c9.ide.language.jsonalyzer/server/invoke_helper.js index c5add499..d243cc09 100644 --- a/plugins/c9.ide.language.jsonalyzer/server/invoke_helper.js +++ b/plugins/c9.ide.language.jsonalyzer/server/invoke_helper.js @@ -30,7 +30,7 @@ handler.init = function(options, callback) { }; handler.invoke = function(path, doc, ast, options, callback) { - options.mode == options.mode || "stdin"; + options.mode = options.mode || "stdin"; if (options.overrideLine != null) { var lines = doc.toString().split(/\r\n|\n|\r/); if (lines[options.overrideLineRow] !== options.overrideLine) {