Merge pull request #2406 from Gared/fix/author-not-set-callback
Fix missing callback of #2400 and ignore missing author on timeslider on client-sidepull/2420/head
commit
c20a7e9bce
|
@ -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();
|
||||
});
|
||||
|
|
|
@ -179,6 +179,8 @@ function loadBroadcastSliderJS(fireWhenAllScriptsAreLoaded)
|
|||
var numNamed = 0;
|
||||
var colorsAnonymous = [];
|
||||
_.each(authors, function(author)
|
||||
{
|
||||
if(author)
|
||||
{
|
||||
var authorColor = clientVars.colorPalette[author.colorId] || author.colorId;
|
||||
if (author.name)
|
||||
|
@ -198,6 +200,7 @@ function loadBroadcastSliderJS(fireWhenAllScriptsAreLoaded)
|
|||
numAnonymous++;
|
||||
if(authorColor) colorsAnonymous.push(authorColor);
|
||||
}
|
||||
}
|
||||
});
|
||||
if (numAnonymous > 0)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue