Fix issue with undefined action.
- Refactor overlay component.
This commit is contained in:
parent
3287d3616e
commit
92cd06bc52
2 changed files with 3 additions and 2 deletions
|
@ -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>;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Add table
Reference in a new issue