更新依赖&版本号(2.6.0-beta.5)

This commit is contained in:
lyswhut
2023-12-12 14:00:22 +08:00
parent e9539b5c5c
commit 050b641d79
21 changed files with 335 additions and 334 deletions
+1 -1
View File
@@ -30,7 +30,7 @@ const migrateV1 = (db: Database.Database) => {
// 修复 v2.4.0 的默认数据库版本号不对的问题
const existsTable = db.prepare('SELECT name FROM "main".sqlite_master WHERE type=\'table\' AND name=\'dislike_list\';').get()
if (!existsTable) {
const sql = tables.get('dislike_list') as string
const sql = tables.get('dislike_list')!
db.exec(sql)
}
}
@@ -322,7 +322,7 @@ export const musicsPositionUpdate = (listId: string, position: number, ids: stri
const map = new Map<string, LX.Music.MusicInfo>()
for (const item of newTargetList) map.set(item.id, item)
for (const id of ids) {
infos.push(map.get(id) as LX.Music.MusicInfo)
infos.push(map.get(id)!)
map.delete(id)
}
newTargetList = newTargetList.filter(mInfo => map.has(mInfo.id))