Fix first view of shares

This commit is contained in:
Jonathan Cremin 2015-01-27 21:23:05 +00:00
parent 2e0b6a151e
commit 7c1b8aa771

View file

@ -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)