File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11# CHANGELOG
22
3+
4+ ## X.X.X (comming soon)
5+
6+ - Improve error message when calling ` postMessage ` to a closed channel.
7+
38## 4.9.0 (23 December 2021)
49
510Bugfixes:
Original file line number Diff line number Diff line change @@ -112,7 +112,13 @@ BroadcastChannel.prototype = {
112112 if ( this . closed ) {
113113 throw new Error (
114114 'BroadcastChannel.postMessage(): ' +
115- 'Cannot post message after channel has closed'
115+ 'Cannot post message after channel has closed ' +
116+ /**
117+ * In the past when this error appeared, it was realy hard to debug.
118+ * So now we log the msg together with the error so it at least
119+ * gives some clue about where in your application this happens.
120+ */
121+ JSON . stringify ( msg )
116122 ) ;
117123 }
118124 return _post ( this , 'message' , msg ) ;
You can’t perform that action at this time.
0 commit comments