Fix error in FileTile when metadata is unavailable

This commit is contained in:
Alex Liebowitz 2017-02-19 18:45:03 -05:00
parent bb26b5372a
commit 1f4ec440df

View file

@ -177,7 +177,8 @@ export let FileTile = React.createClass({
this._isMounted = true;
lbry.resolveName(this.props.name, (metadata) => {
if (this._isMounted) {
if (this._isMounted && metadata) {
// In case of a failed lookup, metadata will be null, in which case the component will never display
this.setState({
sdHash: metadata.sources.lbry_sd_hash,
metadata: metadata,