From e5e27444a5c10a63882245ffd6ce4e9f85acd921 Mon Sep 17 00:00:00 2001 From: Alex Liebowitz Date: Sat, 24 Sep 2016 02:41:53 -0400 Subject: [PATCH] On My Files page, simplify check for file availability --- js/page/my_files.js | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/js/page/my_files.js b/js/page/my_files.js index 2c896cd61..b0b54545a 100644 --- a/js/page/my_files.js +++ b/js/page/my_files.js @@ -197,12 +197,7 @@ var MyFilesPage = React.createClass({ lbry.search(name, (results) => { var result = results[0]; - if (result.name != name) { - // File not listed in Lighthouse - var available = false; - } else { - var available = result.available; - } + var available = result.name == name && result.available; if (typeof this.state.filesAvailable[name] === 'undefined' || available != this.state.filesAvailable[name]) { var newFilesAvailable = Object.assign({}, this.state.filesAvailable);