From 9e215093ca4016fd182f96bb4f4bb9c9993b0094 Mon Sep 17 00:00:00 2001 From: Anders Kaseorg Date: Wed, 29 Jul 2020 15:26:51 -0700 Subject: [PATCH] debug-require: Remove ES6 syntax. Signed-off-by: Anders Kaseorg --- .eslintrc.json | 6 +++++- tools/debug-require.js | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index 3d56f5861f..5f9db07aa3 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -347,7 +347,11 @@ } }, { - "files": ["frontend_tests/casper_lib/**", "frontend_tests/casper_tests/**"], + "files": [ + "frontend_tests/casper_lib/**", + "frontend_tests/casper_tests/**", + "tools/debug-require.js" + ], "env": { "browser": true, "es2020": false diff --git a/tools/debug-require.js b/tools/debug-require.js index 596c6feb6f..2aa998e143 100644 --- a/tools/debug-require.js +++ b/tools/debug-require.js @@ -1,12 +1,12 @@ /* global __webpack_require__ */ -let webpackModules; +var webpackModules; function debugRequire(request) { if (!Object.prototype.hasOwnProperty.call(debugRequire.ids, request)) { throw new Error("Cannot find module '" + request + "'"); } - const moduleId = debugRequire.ids[request]; + var moduleId = debugRequire.ids[request]; if (!Object.prototype.hasOwnProperty.call(webpackModules, moduleId)) { throw new Error("Module '" + request + "' has not been loaded yet"); }