Fix first view of shares
This commit is contained in:
parent
2e0b6a151e
commit
7c1b8aa771
1 changed files with 8 additions and 6 deletions
|
@ -113,12 +113,14 @@ module.exports = React.createClass({
|
||||||
clearInterval(this.state.interval);
|
clearInterval(this.state.interval);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.setState({
|
if (shares.length) {
|
||||||
name: shares[0].name,
|
this.setState({
|
||||||
artist: shares[0].artist.name,
|
name: shares[0].name,
|
||||||
shares: shares,
|
artist: shares[0].artist.name,
|
||||||
shareUrl: "https://match.audio/" + this.props.shares[0].service + "/" + this.props.shares[0].type + "/" + this.props.shares[0].id
|
shares: shares,
|
||||||
});
|
shareUrl: "https://match.audio/" + shares[0].service + "/" + shares[0].type + "/" + shares[0].id
|
||||||
|
});
|
||||||
|
}
|
||||||
}.bind(this));
|
}.bind(this));
|
||||||
}.bind(this)
|
}.bind(this)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue