bugfix: Fix #4120 where an author might not be populated on restart - if this is the case don't push the author to the array.
parent
d19937fa06
commit
beccf677a4
|
@ -1496,8 +1496,12 @@ exports.padUsers = async function(padID) {
|
||||||
let s = sessioninfos[roomClient.id];
|
let s = sessioninfos[roomClient.id];
|
||||||
if (s) {
|
if (s) {
|
||||||
return authorManager.getAuthor(s.author).then(author => {
|
return authorManager.getAuthor(s.author).then(author => {
|
||||||
author.id = s.author;
|
// Fixes: https://github.com/ether/etherpad-lite/issues/4120
|
||||||
padUsers.push(author);
|
// On restart author might not be populated?
|
||||||
|
if(author){
|
||||||
|
author.id = s.author;
|
||||||
|
padUsers.push(author);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
|
|
Loading…
Reference in New Issue