优化代码逻辑,修复潜在播放问题

This commit is contained in:
lyswhut
2023-01-14 16:03:56 +08:00
parent d3c8f16aed
commit 850a429243
35 changed files with 85 additions and 342 deletions
+1 -1
View File
@@ -244,7 +244,7 @@ export const scrollXRTo = (element: HTMLElement, to: number, duration = 300, fn
*/
let dom_title = document.getElementsByTagName('title')[0]
export const setTitle = (title: string | null) => {
if (!title) title = '洛雪音乐助手'
title ||= '洛雪音乐助手'
dom_title.innerText = title
}