From ee73086c06c81b38c0fa38d44b40fff09aff856e Mon Sep 17 00:00:00 2001 From: Ryan Roemer Date: Mon, 6 Sep 2021 14:27:22 -0700 Subject: [PATCH] Bug: (#338) - Bug: Allow socket message to be null. Fixes #335, fixes #336. --- CHANGELOG.md | 5 ++++- bin/webpack-dashboard.js | 4 +++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index eb200c5..9359f14 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,10 @@ # Changelog This project adheres to [Semantic Versioning](http://semver.org/). -Every release, along with the migration instructions, is documented on the Github [Releases](https://github.com/FormidableLabs/webpack-dashboard/releases) page. + +## UNRELEASED + +- Bug: Allow socket messages to be null. [#335](https://github.com/FormidableLabs/webpack-dashboard/issues/335), [#336](https://github.com/FormidableLabs/webpack-dashboard/issues/336) ## [3.3.5] - 2021-07-12 diff --git a/bin/webpack-dashboard.js b/bin/webpack-dashboard.js index f6c2637..60e596c 100755 --- a/bin/webpack-dashboard.js +++ b/bin/webpack-dashboard.js @@ -76,7 +76,9 @@ const main = opts => { }); socket.on("message", (message, ack) => { - if (message.type !== "log") { + // Note: `message` may be null. + // https://github.com/FormidableLabs/webpack-dashboard/issues/335 + if (message && message.type !== "log") { dashboard.setData(message, ack); } });