Remove error, in favor of early return/comment

This commit is contained in:
Jordan Eldredge 2018-09-18 07:43:01 -07:00
parent 76b85df82e
commit 9a7861d054

View file

@ -60,7 +60,9 @@ export default (media: Media) => (store: MiddlewareStore) => {
media.on("fileLoaded", () => {
const id = getCurrentTrackId(store.getState());
if (id == null) {
throw new Error("WAT");
// Attempted to set the metadata for a track that was already removed.
// Really, the media should have been stopped when the track was removed.
return;
}
store.dispatch({
id,