mitul.ca icon indicating copy to clipboard operation
mitul.ca copied to clipboard

fix: stop page error when playing certain audio

Open name opened this issue 1 year ago • 1 comments

  • check if song name contains non-latin text, if so, skip filtering to prevent page error:

Unhandled Runtime Error Error: Cannot read properties of null (reading '0')

Source app/page.tsx (190:18) @ clean

188 | const recent = song.is_playing ? song.item : song.items[0].track; 189 | const track = {

190 | title: filter.clean(recent.name), | ^ 191 | artist: recent.artists 192 | .map((_artist: { name: string }) => _artist.name) 193 | .shift(),

  • if playing podcast/audiobook, recent returns null, return placeholder to stop page error.

name avatar Jun 03 '24 22:06 name

@name is attempting to deploy a commit to the mitul's projects Team on Vercel.

A member of the Team first needs to authorize it.

vercel[bot] avatar Jun 03 '24 22:06 vercel[bot]

closing as low risk

mitul-s avatar Aug 15 '24 04:08 mitul-s