Skip to content

Commit 0e2e9b8

Browse files
committed
Fixed linter error
1 parent d1c5834 commit 0e2e9b8

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

webpackConfigLoader.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -21,18 +21,18 @@ function formatPublicPath(settings) {
2121
const host = settings.dev_server.host;
2222
const port = settings.dev_server.port;
2323
const path = settings.public_output_path;
24-
const hostWithHttp = `http://${host}:${port}`
24+
const hostWithHttp = `http://${host}:${port}`;
2525

2626
let formattedHost = removeOuterSlashes(hostWithHttp);
2727
if (formattedHost && !/^http/i.test(formattedHost)) {
2828
formattedHost = `//${formattedHost}`;
2929
}
3030
const formattedPath = removeOuterSlashes(path);
3131
return `${formattedHost}/${formattedPath}/`;
32-
} else {
33-
const formattedPath = removeOuterSlashes(settings.public_output_path);
34-
return `//${formattedPath}/`;
3532
}
33+
34+
const publicOuterPathWithoutOutsideSlashes = removeOuterSlashes(settings.public_output_path);
35+
return `//${publicOuterPathWithoutOutsideSlashes}/`;
3636
}
3737

3838
/**
@@ -48,7 +48,7 @@ function formatPublicPath(settings) {
4848
*/
4949
const configLoader = (configPath) => {
5050
// Some test environments might not have the NODE_ENV set, so we'll have fallbacks.
51-
const configEnv = (process.env.NODE_ENV || process.env.RAILS_ENV || 'development');
51+
const configEnv = (env.NODE_ENV || env.RAILS_ENV || 'development');
5252
const ymlConfigPath = join(configPath, 'webpacker.yml');
5353
const settings = safeLoad(readFileSync(ymlConfigPath, 'utf8'))[configEnv];
5454

0 commit comments

Comments
 (0)