Fix timeout check in DownloadLink

Was checking typeof streamInfo === 'object', and typeof null is
'object' (because why not?)

I think this was previously returning false for timeouts, and now
will only return null, so the "typeof" part may not be needed anymore.
This commit is contained in:
Alex Liebowitz 2016-12-16 17:59:12 -05:00
parent 7efbccbe83
commit 643c884f56

View file

@ -122,7 +122,7 @@ export let DownloadLink = React.createClass({
});
} else {
lbry.getStream(this.props.streamName, (streamInfo) => {
if (typeof streamInfo !== 'object') {
if (streamInfo === null || typeof streamInfo !== 'object') {
this.setState({
modal: 'timedOut',
downloading: false,