-
Notifications
You must be signed in to change notification settings - Fork 30
Description
Hi, I'm using react-jPlayer for playing various items inside the same page. Basically I want each player to have its own state and I'm giving it an id based on the element that it will be playing, the first time I load the players it works well, but once I go to a different page where additional players are loaded I get an error from mapStateToProps where it's trying to get media from undefined, as if it was trying to access a player id that doesn't exist from the reducer.
Here's the error:
TypeError: Cannot read property 'media' of undefined at Function.mapStateToProps [as mapToProps] (jPlayerContainer.js:36)
I'm wrapping the player inside a component that has additional logic for loading the files, but basically I'm initializing with the corresponding id on componentWillMount.
