Skip to content
This repository was archived by the owner on Feb 6, 2024. It is now read-only.

Commit 0a58c69

Browse files
committed
Catch serialization errors, just to be safe...
1 parent 05cde4f commit 0a58c69

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lib/misc/cube-emitter.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,11 @@
3333
}
3434

3535
for (var i = 0; i < cueBuffer.length; i++) {
36-
socket.send(JSON.stringify(cueBuffer[i]));
36+
try {
37+
socket.send(JSON.stringify(cueBuffer[i]));
38+
} catch (e) {}
3739
}
38-
}
40+
}
3941

4042
window.cube = {
4143
send: function(type, data) {

0 commit comments

Comments
 (0)