1
0
Fork 0

Error check to prevent exception from Cipher

This commit is contained in:
David Banham 2013-03-11 09:15:11 +11:00
parent 523989a21c
commit ccaadaad45
1 changed files with 1 additions and 0 deletions

View File

@ -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);