Update instancesSlice.ts

This commit is contained in:
Zhiyuan Zheng 2022-05-17 23:26:29 +02:00
parent 02360c443f
commit 8a1ccdb305
1 changed files with 1 additions and 0 deletions

View File

@ -306,6 +306,7 @@ const instancesSlice = createSlice({
// Check if frequently used emojis still exist
.addCase(checkEmojis.fulfilled, (state, action) => {
if (!action.payload || !action.payload.length) return
const activeIndex = findInstanceActive(state.instances)
state.instances[activeIndex].frequentEmojis = state.instances[
activeIndex