We are using a package that depends on postmessage. We get multiple warnings in the console log because postmessage complains it can not parse the JSON in the messages. This happens in 2 distinct scenraios:
When e.data is empty '' or undefined, and
When e.data contains a property that is undefined
There should be a way to suppress these warnings as they clutter the console and inhibit debugging. I believe if postmessage can't parse the messages that it should just silently ignore them. Or it should be marking messages that are sent using postmessage and ignoring messages that were sent using window.postMessage directly.
The warnings are for messages sent via window.postMessage that aren't even to/from the package that is depending on postmessage ... the messages that are causing the warnings are coming from the Redux DevTools Chrome extension and Webpack Dev Server.
We are using a package that depends on
postmessage
. We get multiple warnings in the console log because postmessage complains it can not parse the JSON in the messages. This happens in 2 distinct scenraios:e.data
is empty''
orundefined
, ande.data
contains a property that isundefined
There should be a way to suppress these warnings as they clutter the console and inhibit debugging. I believe if
postmessage
can't parse the messages that it should just silently ignore them. Or it should be marking messages that are sent usingpostmessage
and ignoring messages that were sent usingwindow.postMessage
directly.The warnings are for messages sent via
window.postMessage
that aren't even to/from the package that is depending onpostmessage
... the messages that are causing the warnings are coming from theRedux DevTools
Chrome extension andWebpack Dev Server
.