From 643c884f567afebbcc6effb3b1b02f24d2d5cf93 Mon Sep 17 00:00:00 2001 From: Alex Liebowitz Date: Fri, 16 Dec 2016 17:59:12 -0500 Subject: [PATCH] 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. --- js/component/link.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/component/link.js b/js/component/link.js index 0e305e789..e1ddff543 100644 --- a/js/component/link.js +++ b/js/component/link.js @@ -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,