Try to fix weird crash

This commit is contained in:
Zhiyuan Zheng 2022-02-06 18:09:11 +01:00
parent 8fbe5d2cad
commit 911a4e02ee
1 changed files with 5 additions and 4 deletions

View File

@ -169,10 +169,11 @@ const instancesSlice = createSlice({
action: PayloadAction<Instance['timelinesLookback']>
) => {
const activeIndex = findInstanceActive(instances)
instances[activeIndex].timelinesLookback = {
...instances[activeIndex].timelinesLookback,
...action.payload
}
instances[activeIndex] &&
(instances[activeIndex].timelinesLookback = {
...instances[activeIndex].timelinesLookback,
...action.payload
})
},
updateInstanceMePage: (
{ instances },