mirror of https://github.com/zulip/zulip.git
debug-require: Remove ES6 syntax.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
parent
2d8ed545d4
commit
9e215093ca
|
@ -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
|
||||
|
|
|
@ -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");
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue