We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 021d54d commit 210c846Copy full SHA for 210c846
lib/client.js
@@ -266,10 +266,12 @@
266
this._listener = function(message) {
267
var i, error, response;
268
269
- if (client._closed) return;
270
-
271
- // Ignore messages not from our hub
272
- if (message.origin !== client._origin) return;
+ // Ignore invalid messages, those not from the correct hub, or when
+ // the client has closed
+ if (client._closed || !message.data || !message.data.indexOf ||
+ message.origin !== client._origin) {
273
+ return;
274
+ }
275
276
// LocalStorage isn't available in the hub
277
if (message.data === 'cross-storage:unavailable') {
0 commit comments