Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

Commit 4dd2d18

Browse files
committed
Fix of server code
1 parent 6d87102 commit 4dd2d18

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

src/server/index.js

+8-3
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,14 @@ import webpackConfigFactory from '../../webpack.config';
1313

1414
const mode = process.env.BABEL_ENV;
1515

16-
let ts = path.resolve(__dirname, '../../.build-info');
17-
ts = JSON.parse(fs.readFileSync(ts));
18-
ts = moment(ts.timestamp).valueOf();
16+
let ts;
17+
try {
18+
ts = path.resolve(__dirname, '../../.build-info');
19+
ts = JSON.parse(fs.readFileSync(ts));
20+
ts = moment(ts.timestamp).valueOf();
21+
} catch (e) {
22+
ts = 0;
23+
}
1924

2025
const EXTRA_SCRIPTS = [
2126
`<script

0 commit comments

Comments
 (0)