diff --git a/src/node/handler/PadMessageHandler.js b/src/node/handler/PadMessageHandler.js index 6c7843992..3228330e3 100644 --- a/src/node/handler/PadMessageHandler.js +++ b/src/node/handler/PadMessageHandler.js @@ -1070,7 +1070,12 @@ function handleClientReady(client, message) { authorManager.getAuthor(authorId, function(err, author) { - if(ERR(err, callback) || !author) return; + if(!author && !err) + { + messageLogger.error("There is no author for authorId:", authorId); + return callback(); + } + if(ERR(err, callback)) return; historicalAuthorData[authorId] = {name: author.name, colorId: author.colorId}; // Filter author attribs (e.g. don't send author's pads to all clients) callback(); }); diff --git a/src/static/js/broadcast_slider.js b/src/static/js/broadcast_slider.js index 344a7b549..7f0e48bc8 100644 --- a/src/static/js/broadcast_slider.js +++ b/src/static/js/broadcast_slider.js @@ -180,23 +180,26 @@ function loadBroadcastSliderJS(fireWhenAllScriptsAreLoaded) var colorsAnonymous = []; _.each(authors, function(author) { - var authorColor = clientVars.colorPalette[author.colorId] || author.colorId; - if (author.name) + if(author) { - if (numNamed !== 0) authorsList.append(', '); - - $('') - .text(author.name || "unnamed") - .css('background-color', authorColor) - .addClass('author') - .appendTo(authorsList); + var authorColor = clientVars.colorPalette[author.colorId] || author.colorId; + if (author.name) + { + if (numNamed !== 0) authorsList.append(', '); + + $('') + .text(author.name || "unnamed") + .css('background-color', authorColor) + .addClass('author') + .appendTo(authorsList); - numNamed++; - } - else - { - numAnonymous++; - if(authorColor) colorsAnonymous.push(authorColor); + numNamed++; + } + else + { + numAnonymous++; + if(authorColor) colorsAnonymous.push(authorColor); + } } }); if (numAnonymous > 0)