Skip to content
Permalink
Browse files

fix(plugin-webpack): check that stats is not empty before sending to …

…multi-logger (#1018)
  • Loading branch information
malept committed Jul 12, 2019
1 parent fe33a73 commit aa8587bfed7d0c02c25bb448031b485348bfc0d9
Showing with 6 additions and 4 deletions.
  1. +6 −4 packages/plugin/webpack/src/WebpackPlugin.ts
@@ -360,7 +360,7 @@ Your packaged app may be larger than expected if you dont ignore everything othe
const compiler = webpack(await this.getMainConfig());
const [onceResolve, onceReject] = once(resolve, reject);
const cb: webpack.ICompiler.Handler = (err, stats) => {
if (tab) {
if (tab && stats) {
tab.log(stats.toString({
colors: true,
}));
@@ -443,9 +443,11 @@ Your packaged app may be larger than expected if you dont ignore everything othe
const tab = logger.createTab(`${entryPoint.name} - Preload`);
const [onceResolve, onceReject] = once(resolve, reject);
const cb: webpack.ICompiler.Handler = (err, stats) => {
tab.log(stats.toString({
colors: true,
}));
if (stats) {
tab.log(stats.toString({
colors: true,
}));
}

if (err) return onceReject(err);
return onceResolve();

0 comments on commit aa8587b

Please sign in to comment.
You can’t perform that action at this time.