Skip to content

Commit

Permalink
뒷보면이 표시가 되지 않는 버그 해결
Browse files Browse the repository at this point in the history
  • Loading branch information
hotsixisbest committed Apr 4, 2024
1 parent 16e5ec7 commit 05d903f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/injections/dani.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@ export default async function dani (): Promise<void> {
// eslint-disable-next-line @typescript-eslint/non-nullable-type-assertion-style
const songTitle = (box.querySelector('.songName') as HTMLElement).innerText.trim()
const songNo = songdata.getSongNoByTitle(songTitle)
const difficulty = box.querySelector('img')?.src.replace(/https:\/\/donderhiroba.jp\/image\/sp\/640\/level_icon_(.)_640.png/, '$1')
let difficulty = box.querySelector('img')?.src.replace(/https:\/\/donderhiroba.jp\/image\/sp\/640\/level_icon_(.)_640.png/, '$1')
if (difficulty === 'https://donderhiroba.jp/image/sp/640/icon_ura_640.png') {
difficulty = '5'
}

// db에 해당 곡명을 가진 곡에 대한 데이터가 없으면 종료
if (songNo === undefined || difficulty === undefined) throw new Error()
Expand Down

0 comments on commit 05d903f

Please sign in to comment.