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

TypeError: Cannot read property 'currentTime' of null #3

Closed ghost closed 6 years ago

ghost commented 6 years ago

This pops up after a song is finished playing:

TypeError: Cannot read property 'currentTime' of null (anonymous function) src/js/components/bar/components/controls/index.js:97 94 | createTimeInterval() { 95 | this.playInterval = setInterval(() => { 96 | this.props.updateTime({ 97 | current: this.audio.currentTime, 98 | max: this.audio.duration, 99 | }); 100 | }, 1000);

97 is the one that is making the error happen I believe.

tvillarete commented 6 years ago

I believe https://github.com/tvillarete/apple-music-js/pull/4 addresses this issue. Thanks for bringing it up!