Fix issue with undefined action.

- Refactor overlay component.
This commit is contained in:
Daniel Dominguez 2018-05-31 18:20:21 -03:00
parent 3287d3616e
commit 92cd06bc52
2 changed files with 3 additions and 2 deletions

View file

@ -9,7 +9,8 @@ type Props = {
class Overlay extends React.PureComponent<Props> {
render() {
const { showOverlay, children } = this.props;
return <div className="overlay">{showOverlay ? children : ''}</div>;
if (!showOverlay) return '';
return <div className="overlay">{children}</div>;
}
}

View file

@ -28,7 +28,7 @@ export default handleActions(
paused: true,
}),
[actions.MEDIA_POSITION]: (state: MediaState) => {
[actions.MEDIA_POSITION]: (state: MediaState, action: Action) => {
const { outpoint, position } = action.data;
return {
...state,