Skip to content

Commit b540f86

Browse files
committed
fix: prevent WebpackLogger 'done hook' error when callback throws
- Replace try/catch with try/finally to always call callback() - Improve test to explicitly assert WebpackLogger error is not logged
1 parent 6c634ba commit b540f86

File tree

3 files changed

+138
-377
lines changed

3 files changed

+138
-377
lines changed

src/BundleAnalyzerPlugin.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ class BundleAnalyzerPlugin {
6969
// Making analyzer logs to be after all webpack logs in the console
7070
setImmediate(async () => {
7171
try {
72-
await Promise.all(actions.map(action => action()));
72+
await Promise.all(actions.map((action) => action()));
7373
} finally {
7474
callback();
7575
}

0 commit comments

Comments
 (0)