Skip to content

Commit

Permalink
Move where some variables are initialized
Browse files Browse the repository at this point in the history
  • Loading branch information
PapiOphidian committed Nov 19, 2023
1 parent b2ff7e4 commit cab1d91
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions packages/runtime-website/src/music/tracktypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -302,10 +302,9 @@ export class ExternalTrack extends Track {
) {
super(track, info, input, requester, lang)

const to = new URL(info.uri!)
let name = ""

if (!info.title || info.title === "Unknown title") {
const to = new URL(info.uri!)
let name = ""
const match = pathnamereg.exec(to.pathname)
if (!match) name = lang.GLOBAL.UNKNOWN_TRACK
else name = match[1]
Expand Down

0 comments on commit cab1d91

Please sign in to comment.