bugfix :: 방에 초대되고, 대화가 없을때 방정보가 없는 상태에서 강퇴를 당한다면 roomInfo 가 없을 수 있다. 이때는 아무런 액션을 하지 않는다.
This commit is contained in:
parent
9323a2af0d
commit
5fc33c20e8
@ -105,6 +105,11 @@ export const reducer = createReducer(
|
|||||||
on(clearRoomUsers, (state, action) => {
|
on(clearRoomUsers, (state, action) => {
|
||||||
const roomInfo = state.room.entities[action.roomSeq];
|
const roomInfo = state.room.entities[action.roomSeq];
|
||||||
|
|
||||||
|
if (!roomInfo) {
|
||||||
|
// 방에 초대만 되고 대화가 발생하지 않아 방정보가 없을때, 방에서 강퇴된다면 roomInfo 가 없을 수 있다.
|
||||||
|
return { ...state };
|
||||||
|
}
|
||||||
|
|
||||||
const roomUserList: RoomUserDetailData = {
|
const roomUserList: RoomUserDetailData = {
|
||||||
...state.roomUser.entities[action.roomSeq]
|
...state.roomUser.entities[action.roomSeq]
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user