修复列表数据更新后,选中列表被意外重置回默认列表的问题

This commit is contained in:
lyswhut 2023-03-01 22:39:05 +08:00
parent 2169c9eb3b
commit 4a0e09087c

View File

@ -28,7 +28,7 @@ const updateUserList = async(userLists: LX.List.UserListInfo[]) => {
const checkListExist = (changedIds: string[]) => {
const index = changedIds.indexOf(listState.activeListId)
if (index < 0) return
if (index < 0 || listState.allList.some(l => l.id == listState.activeListId)) return
setActiveList(LIST_IDS.DEFAULT)
}