diff --git a/src/App.js b/src/App.js index 727758a..3fd7571 100644 --- a/src/App.js +++ b/src/App.js @@ -28,14 +28,14 @@ const filepath = new Filepath("C:\\Users\\Paoda\\Downloads"); song = await Song.getMetadata(song); Song.setAlbumArt(song.metadata); - mp.load(song); + mp.loadSong(song); // mp.play(); mp.element.onended = async () => { let song = new Song(list[~~(Math.random() * list.length)]); song = await Song.getMetadata(song); Song.setAlbumArt(song.metadata); - mp.load(song); + mp.loadSong(song); mp.play(); }; })(); diff --git a/src/components/Body.js b/src/components/Body.js index e0d5893..577e352 100644 --- a/src/components/Body.js +++ b/src/components/Body.js @@ -29,12 +29,14 @@ export default class Body extends React.Component { this.initialize(); } shouldComponentUpdate(nextProps, state) { - if (this.state.table.id) return this.state.table.id !== state.table.id; + if (this.state.table) return this.state.table.id !== state.table.id; + else return false; // On Feb 13 2019 Had problem wehre this.state.table.id was undefined. // Unable to replicate issue, but it's a serous one. Probably should fix this yeah? } render() { - console.log("Render TableID: " + this.state.table.id); + if (this.state.table) console.log("Render TableID: " + this.state.table.id); + else console.warn("No Table Present"); return (