Error check to prevent exception from Cipher
parent
523989a21c
commit
ccaadaad45
|
@ -15,6 +15,7 @@ var opts = {
|
||||||
|
|
||||||
io.sockets.on('connection', function(socket) {
|
io.sockets.on('connection', function(socket) {
|
||||||
socket.on('slidechanged', function(slideData) {
|
socket.on('slidechanged', function(slideData) {
|
||||||
|
if (typeof slideData.secret == 'undefined' || slideData.secret == null || slideData.secret === '') return;
|
||||||
if (createHash(slideData.secret) === slideData.socketId) {
|
if (createHash(slideData.secret) === slideData.socketId) {
|
||||||
slideData.secret = null;
|
slideData.secret = null;
|
||||||
socket.broadcast.emit(slideData.socketId, slideData);
|
socket.broadcast.emit(slideData.socketId, slideData);
|
||||||
|
|
Loading…
Reference in New Issue