Skip to content

Commit 2dc7f9f

Browse files
committed
More explicit
1 parent 9910ec3 commit 2dc7f9f

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

Diff for: packages/react-scripts/scripts/build.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,11 @@ if (!checkRequiredFiles([paths.appHtml, paths.appIndexJs])) {
6060
// browserslist defaults.
6161
const { checkBrowsers } = require('react-dev-utils/browsersHelper');
6262
checkBrowsers(paths.appPath)
63-
.then(() =>
63+
.then(() => {
6464
// First, read the current file sizes in build directory.
6565
// This lets us display how much they changed later.
66-
measureFileSizesBeforeBuild(paths.appBuild)
67-
)
66+
return measureFileSizesBeforeBuild(paths.appBuild);
67+
})
6868
.then(previousFileSizes => {
6969
// Remove all content but keep the directory so that
7070
// if you're in it, you don't end up in Trash

Diff for: packages/react-scripts/scripts/start.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,11 @@ const HOST = process.env.HOST || '0.0.0.0';
6262
// browserslist defaults.
6363
const { checkBrowsers } = require('react-dev-utils/browsersHelper');
6464
checkBrowsers(paths.appPath)
65-
.then(() =>
65+
.then(() => {
6666
// We attempt to use the default port but if it is busy, we offer the user to
6767
// run on a different port. `choosePort()` Promise resolves to the next free port.
68-
choosePort(HOST, DEFAULT_PORT)
69-
)
68+
return choosePort(HOST, DEFAULT_PORT);
69+
})
7070
.then(port => {
7171
if (port == null) {
7272
// We have not found a port.

0 commit comments

Comments
 (0)