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 6a5d2a1 commit 64d22bbCopy full SHA for 64d22bb
lib/client.js
@@ -242,7 +242,7 @@ CrossStorageClient.prototype._installListener = function() {
242
var client = this;
243
244
this._listener = function(message) {
245
- var i, error;
+ var i, error, response;
246
247
if (client._closed) return;
248
@@ -276,7 +276,12 @@ CrossStorageClient.prototype._installListener = function() {
276
if (message.data === 'ready') return;
277
278
// All other messages
279
- var response = JSON.parse(message.data);
+ try {
280
+ response = JSON.parse(message.data);
281
+ } catch(e) {
282
+ return;
283
+ }
284
+
285
if (!response.id) return;
286
287
if (client._requests[response.id]) {
0 commit comments