Skip to content

Commit 6ee7e56

Browse files
refactor: code
1 parent 8a31a9a commit 6ee7e56

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/Server.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1630,7 +1630,7 @@ class Server {
16301630
});
16311631
}
16321632

1633-
if (this.options.static) {
1633+
if (this.options.static.length > 0) {
16341634
this.options.static.forEach((staticOption) => {
16351635
staticOption.publicPath.forEach((publicPath) => {
16361636
middlewares.push({
@@ -1672,7 +1672,7 @@ class Server {
16721672
middleware: this.middleware,
16731673
});
16741674

1675-
if (this.options.static) {
1675+
if (this.options.static.length > 0) {
16761676
this.options.static.forEach((staticOption) => {
16771677
staticOption.publicPath.forEach((publicPath) => {
16781678
middlewares.push({
@@ -1688,7 +1688,7 @@ class Server {
16881688
}
16891689
}
16901690

1691-
if (this.options.static) {
1691+
if (this.options.static.length > 0) {
16921692
const serveIndex = require("serve-index");
16931693

16941694
this.options.static.forEach((staticOption) => {
@@ -2015,7 +2015,7 @@ class Server {
20152015
}
20162016
}
20172017

2018-
if (this.options.static && this.options.static.length > 0) {
2018+
if (this.options.static.length > 0) {
20192019
this.logger.info(
20202020
`Content not from webpack is served from '${colors.info(
20212021
useColor,

0 commit comments

Comments
 (0)