chore: typo

This commit is contained in:
Tristan Yang
2022-07-17 17:37:36 +08:00
parent 65049677e4
commit 315c3d7497
+3 -3
View File
@@ -19,9 +19,9 @@ const channelMsgSlice = createSlice({
addChannelMsg(state, action: PayloadAction<{ id: number; mid: number; local_id?: any }>) {
const { id, mid, local_id = null } = action.payload;
if (state[id]) {
const midExsited = state[id]!.findIndex((id) => id == mid) > -1;
const localMsgExsited = state[id]!.findIndex((id) => id == local_id) > -1;
if (midExsited || localMsgExsited) return;
const midExisted = state[id]!.findIndex((id) => id == mid) > -1;
const localMsgExisted = state[id]!.findIndex((id) => id == local_id) > -1;
if (midExisted || localMsgExisted) return;
state[id]!.push(+mid);
} else {
state[id] = [+mid];