diff --git a/apps/meteor/ee/app/livechat-enterprise/server/services/omnichannel.internalService.ts b/apps/meteor/ee/app/livechat-enterprise/server/services/omnichannel.internalService.ts index 850da689823ef..b5ccdeae7700f 100644 --- a/apps/meteor/ee/app/livechat-enterprise/server/services/omnichannel.internalService.ts +++ b/apps/meteor/ee/app/livechat-enterprise/server/services/omnichannel.internalService.ts @@ -33,7 +33,7 @@ export class OmnichannelEE extends ServiceClassInternal implements IOmnichannelE const { _id: roomId } = room; const restrictedOnHold = settings.get('Livechat_allow_manual_on_hold_upon_agent_engagement_only'); const canRoomBePlacedOnHold = !room.onHold; - const canAgentPlaceOnHold = !room.lastMessage.token; + const canAgentPlaceOnHold = !room.lastMessage?.token; const canPlaceChatOnHold = canRoomBePlacedOnHold && (!restrictedOnHold || canAgentPlaceOnHold); if (!room || !isOmnichannelRoom(room)) {