diff --git a/back/methods/chat/sendCheckingPresence.js b/back/methods/chat/sendCheckingPresence.js index b2a3ca725..7e74a6980 100644 --- a/back/methods/chat/sendCheckingPresence.js +++ b/back/methods/chat/sendCheckingPresence.js @@ -37,7 +37,7 @@ module.exports = Self => { } }); const department = workerDepartment && workerDepartment.department(); - const channelName = department.chatName; + const channelName = department && department.chatName; if (channelName) return Self.send(ctx, `#${channelName}`, `@${account.name} => ${message}`);