From f6a2632d80c22a28a3b6e099a4800b027cc2d685 Mon Sep 17 00:00:00 2001 From: joneugster Date: Thu, 7 Dec 2023 02:29:56 +0100 Subject: [PATCH] fix error message on importing non-existing game tile --- server/index.mjs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server/index.mjs b/server/index.mjs index ac3ef6d..743af10 100644 --- a/server/index.mjs +++ b/server/index.mjs @@ -65,13 +65,13 @@ function getGameDir(owner, repo) { if (owner == 'local') { if(!isDevelopment) { console.error(`No local games in production mode.`) - return + return "" } } else { if(!fs.existsSync(path.join(__dirname, '..', 'games'))) { console.error(`Did not find the following folder: ${path.join(__dirname, '..', 'games')}`) console.error('Did you already import any games?') - return + return "" } } @@ -81,7 +81,7 @@ function getGameDir(owner, repo) { if(!fs.existsSync(game_dir)) { console.error(`Game '${game_dir}' does not exist!`) - return + return "" } return game_dir;