[bug] Fix crash with undefined firstParticipantNoView

This commit is contained in:
Sergey Konovalov
2024-10-01 19:38:48 +03:00
parent 4304e401e4
commit 5b969132b1

View File

@ -2903,7 +2903,7 @@ exports.install = function(server, callbackFunction) {
}
let lockDocument = null;
let waitAuthUserId;
if (!bIsRestore && 2 === countNoView && !tmpUser.view) {
if (!bIsRestore && 2 === countNoView && !tmpUser.view && firstParticipantNoView) {
// lock a document
const lockRes = yield editorData.lockAuth(ctx, docId, firstParticipantNoView.id, 2 * tenExpLockDoc);
if (constants.CONN_CLOSED === conn.conn.readyState) {