ensure that content_type exists

This commit is contained in:
Job Evers-Meltzer 2017-01-17 21:57:16 -06:00
parent 22c4f41066
commit f1b2d0d62d

View file

@ -191,7 +191,7 @@ export let FileActions = React.createClass({
return (
<section className="file-actions">
{this.props.metadata.content_type.startsWith('video/') ? <WatchLink streamName={this.props.streamName} /> : null}
{(this.props.metadata.content_type && this.props.metadata.content_type.startsWith('video/')) ? <WatchLink streamName={this.props.streamName} /> : null}
{this.state.fileInfo !== null || this.state.fileInfo.isMine ?
<div className="button-container">{linkBlock}</div>
: null}