fix: group update SSE event

This commit is contained in:
zerosoul
2022-05-18 22:15:45 +08:00
parent 03bce1b724
commit 45e9e4ef6d
4 changed files with 24 additions and 12 deletions
+2 -1
View File
@@ -1,5 +1,6 @@
import { createSlice } from "@reduxjs/toolkit";
import BASE_URL from "../config";
import { getNonNullValues } from "../../common/utils";
const initialState = {
ids: [],
byId: {},
@@ -71,7 +72,7 @@ const channelsSlice = createSlice({
}
break;
default:
state.byId[id] = { ...state.byId[id], ...rest };
state.byId[id] = { ...state.byId[id], ...getNonNullValues(rest) };
break;
}
},