In index.pug avoid nil pointer dereferencing.
This commit is contained in:
parent
b8afed6e1b
commit
65ec8c1db2
@ -45,8 +45,8 @@ html(lang='en')
|
|||||||
source(src='/live/stream.ogg' type='audio/ogg')
|
source(src='/live/stream.ogg' type='audio/ogg')
|
||||||
| Your browser doesn't support an audio element, it's sad... But you always can take the #[a(href='/playlist') playlist]!
|
| Your browser doesn't support an audio element, it's sad... But you always can take the #[a(href='/playlist') playlist]!
|
||||||
div
|
div
|
||||||
- cur := *songList.Current()
|
if (songList.Current() != nil)
|
||||||
if (cur.Artist != "")
|
- cur := *songList.Current()
|
||||||
p Now playing: #[span#radio-song #{cur.ArtistTitle()}] ( #[span#radio-duration-estimate ] #[span#radio-duration #{cur.DurationString()}] )
|
p Now playing: #[span#radio-song #{cur.ArtistTitle()}] ( #[span#radio-duration-estimate ] #[span#radio-duration #{cur.DurationString()}] )
|
||||||
else
|
else
|
||||||
p Now playing: #[span#radio-song ] ( #[span#radio-duration-estimate ] #[span#radio-duration ] )
|
p Now playing: #[span#radio-song ] ( #[span#radio-duration-estimate ] #[span#radio-duration ] )
|
||||||
|
Loading…
Reference in New Issue
Block a user