From 93880736b5dc2d7291869265a2579654271c0c94 Mon Sep 17 00:00:00 2001 From: Aleksander Nicacio da Silva Date: Fri, 15 Sep 2023 10:19:43 -0300 Subject: [PATCH] fix: added default value to activity --- apps/meteor/client/hooks/omnichannel/useIsRoomActive.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/meteor/client/hooks/omnichannel/useIsRoomActive.tsx b/apps/meteor/client/hooks/omnichannel/useIsRoomActive.tsx index cfae1a44bf10..b57a35b0ce28 100644 --- a/apps/meteor/client/hooks/omnichannel/useIsRoomActive.tsx +++ b/apps/meteor/client/hooks/omnichannel/useIsRoomActive.tsx @@ -3,7 +3,7 @@ import { useMemo } from 'react'; export const useIsRoomActive = (room: IOmnichannelRoom) => { // @ts-ignore - const { activity } = room.v; // TODO: add activity to IOmnichannelRoom['v'] + const { activity = [] } = room.v; // TODO: add activity to IOmnichannelRoom['v'] const isContactActive = useMemo(() => { const date = new Date(); const currentPeriod = `${date.getFullYear()}-${date.getMonth() + 1}`;