tvillarete / apple-music-js

A music streaming service built from the ground up using React & Redux
http://tannerv.com/music
MIT License
1.83k stars 198 forks source link

Check if this.audio is available before setting state #4

Closed vernondegoede closed 6 years ago

vernondegoede commented 6 years ago

I got an error while running the app locally. Probably happened because the playInterval wasn't cleared correctly.

This should fix the error, although the interval should still be cleared (couldn't find where this went wrong exactly).

tvillarete commented 6 years ago

Looks good to me! I very recently added the ability to change the track time via a scrubber, so I don't doubt that there are a few bugs. I haven't actually tried to reproduce the error, but adding a check for this.audio couldn't hurt. Thanks!