mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-01-19 14:13:34 +01:00
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.
This commit is contained in:
parent
d19937fa06
commit
beccf677a4
1 changed files with 6 additions and 2 deletions
|
@ -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 => {
|
||||||
|
// Fixes: https://github.com/ether/etherpad-lite/issues/4120
|
||||||
|
// On restart author might not be populated?
|
||||||
|
if(author){
|
||||||
author.id = s.author;
|
author.id = s.author;
|
||||||
padUsers.push(author);
|
padUsers.push(author);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
|
|
Loading…
Reference in a new issue