# 이슈처리 263

This commit is contained in:
leejinho 2020-02-26 10:29:05 +09:00
parent 8c0358eba9
commit 2c94c9f7bd

View File

@ -71,12 +71,21 @@ export const reducer = createReducer(
}), }),
on(updateSuccess, (state, action) => { on(updateSuccess, (state, action) => {
const curRoomInfo = state.roomInfo;
let roomName = curRoomInfo.roomName;
let receiveAlarm = curRoomInfo.receiveAlarm;
if (curRoomInfo.roomSeq === action.res.roomSeq) {
roomName = action.res.roomName;
receiveAlarm = action.res.receiveAlarm;
}
return { return {
...state, ...state,
roomInfo: { roomInfo: {
...state.roomInfo, ...state.roomInfo,
roomName: action.res.roomName, roomName,
receiveAlarm: action.res.receiveAlarm receiveAlarm
} }
}; };
}), }),