diff --git a/projects/ucap-webmessenger-app/src/app/store/messenger/sync/reducers.ts b/projects/ucap-webmessenger-app/src/app/store/messenger/sync/reducers.ts index 163eb95f..16e24260 100644 --- a/projects/ucap-webmessenger-app/src/app/store/messenger/sync/reducers.ts +++ b/projects/ucap-webmessenger-app/src/app/store/messenger/sync/reducers.ts @@ -105,6 +105,11 @@ export const reducer = createReducer( on(clearRoomUsers, (state, action) => { const roomInfo = state.room.entities[action.roomSeq]; + if (!roomInfo) { + // 방에 초대만 되고 대화가 발생하지 않아 방정보가 없을때, 방에서 강퇴된다면 roomInfo 가 없을 수 있다. + return { ...state }; + } + const roomUserList: RoomUserDetailData = { ...state.roomUser.entities[action.roomSeq] };