diff --git a/tests/lib/linter.js b/tests/lib/linter.js index a6352c0f9627..1798ca71633c 100644 --- a/tests/lib/linter.js +++ b/tests/lib/linter.js @@ -20,7 +20,8 @@ function compatRequire(name, windowName) { if (typeof window === "object") { return window[windowName || name]; - } else if (typeof require === "function") { + } + if (typeof require === "function") { return require(name); } throw new Error(`Cannot find object '${name}'.`);