From 1a95948ddab8c1b8fed6f5fb09c4eb82ab251674 Mon Sep 17 00:00:00 2001 From: Jozen Date: Tue, 10 Sep 2019 14:20:45 +0800 Subject: [PATCH] Fix crash when launcher not installed --- src/js/Import.js | 52 +++++++++++++++++++++++++----------------------- 1 file changed, 27 insertions(+), 25 deletions(-) diff --git a/src/js/Import.js b/src/js/Import.js index 67542d5..b5de70f 100644 --- a/src/js/Import.js +++ b/src/js/Import.js @@ -232,31 +232,33 @@ class Import extends React.Component { noLaunchers ) : ( Object.keys(games).map((platform, i) => { - if (!this.platforms[i].error) { - return ( -
-
{this.platforms[i].name}
- - -
- ); - } else { - return ( -
-
{this.platforms[i].name}
-

Error importing: {this.platforms[i].errorReason.message}

-
- ); + if (this.platforms[i].installed) { + if (!this.platforms[i].error) { + return ( +
+
{this.platforms[i].name}
+ + +
+ ); + } else { + return ( +
+
{this.platforms[i].name}
+

Error importing: {this.platforms[i].errorReason.message}

+
+ ); + } } }) )}