From aaea3157b16020e962c790e7e3aee73d76b05ae4 Mon Sep 17 00:00:00 2001 From: Bradley Ayers Date: Sat, 30 Sep 2017 15:34:10 +1000 Subject: [PATCH] Gracefully handle fatal webpack errors. --- app/react/src/server/build.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/react/src/server/build.js b/app/react/src/server/build.js index 884b9a7188a7..10d97cf9608b 100755 --- a/app/react/src/server/build.js +++ b/app/react/src/server/build.js @@ -83,7 +83,7 @@ webpack(config).run((err, stats) => { // eslint-disable-next-line no-unused-expressions err && logger.error(err.message); // eslint-disable-next-line no-unused-expressions - stats.hasErrors() && stats.toJson().errors.forEach(e => logger.error(e)); + stats && stats.hasErrors() && stats.toJson().errors.forEach(e => logger.error(e)); process.exit(1); }