From 2f3ce708df04afdf55b4a73c746c88122d8ffc35 Mon Sep 17 00:00:00 2001 From: spalger Date: Fri, 1 Apr 2016 13:14:14 -0700 Subject: [PATCH] Backport PR #6736 --------- **Commit 1:** [internal] Remove all variable redeclarations Redeclaring variables causes ambiguity and serves no purpose. It actually causes a runtime error when you do it with `let`, and we can enforce not doing it via a linter rule. * Original sha: de20762889a72c060e46b5e7042320c71e44ad92 * Authored by Court Ewing on 2016-04-01T18:21:55Z --- src/ui/public/agg_types/buckets/range.js | 2 +- test/fixtures/scenario_manager.js | 1 - test/functional/apps/discover/index.js | 1 - test/functional/apps/visualize/index.js | 1 - 4 files changed, 1 insertion(+), 4 deletions(-) diff --git a/src/ui/public/agg_types/buckets/range.js b/src/ui/public/agg_types/buckets/range.js index 8f5023f111c65..d5cb363987181 100644 --- a/src/ui/public/agg_types/buckets/range.js +++ b/src/ui/public/agg_types/buckets/range.js @@ -26,7 +26,7 @@ define(function (require) { var id = RangeKey.idBucket(bucket); - var key = keys.get(id); + key = keys.get(id); if (!key) { key = new RangeKey(bucket); keys.set(id, key); diff --git a/test/fixtures/scenario_manager.js b/test/fixtures/scenario_manager.js index a4c82d6f2cd4a..224b640cad816 100644 --- a/test/fixtures/scenario_manager.js +++ b/test/fixtures/scenario_manager.js @@ -120,7 +120,6 @@ ScenarioManager.prototype.loadIfEmpty = function (id) { var scenario = config[id]; if (!scenario) throw new Error('No scenario found for ' + id); - var self = this; return Promise.all(scenario.bulk.map(function mapBulk(bulk) { var loadIndexDefinition; diff --git a/test/functional/apps/discover/index.js b/test/functional/apps/discover/index.js index c81f441ba4d0d..9fbebd059f08b 100644 --- a/test/functional/apps/discover/index.js +++ b/test/functional/apps/discover/index.js @@ -9,7 +9,6 @@ define(function (require) { var collapseExpand = require('./_collapse_expand'); bdd.describe('discover app', function () { - var scenarioManager; var remote; var scenarioManager = new ScenarioManager(url.format(config.servers.elasticsearch)); this.timeout = config.timeouts.default; diff --git a/test/functional/apps/visualize/index.js b/test/functional/apps/visualize/index.js index 4492d165c3af4..21ecf1777a3e8 100644 --- a/test/functional/apps/visualize/index.js +++ b/test/functional/apps/visualize/index.js @@ -20,7 +20,6 @@ define(function (require) { bdd.describe('visualize app', function () { var common; - var scenarioManager; var remote; var headerPage; var settingsPage;