From ce6280459d290176a7bff80e3ba3eb0fadb5dc18 Mon Sep 17 00:00:00 2001 From: Astra Date: Sat, 5 May 2018 16:37:39 -0400 Subject: [PATCH] possible fix for fresh installs --- app/index.htm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/index.htm b/app/index.htm index 05a8e48..3ea646a 100644 --- a/app/index.htm +++ b/app/index.htm @@ -59,7 +59,7 @@ } // install endpwn - var o = JSON.parse(fs.readFileSync(data + '/settings.json', 'utf8')); // load settings.json + var o = fs.existsSync(data + '/settings.json') ? JSON.parse(fs.readFileSync(data + '/settings.json', 'utf8')) : {}; // load settings.json o['WEBAPP_ENDPOINT'] = 'https://endpwn.github.io/endpwn3'; // aim the app at stage 0 o['WEBAPP_PATH'] = '/app?_=' + Date.now(); // cache busting fs.writeFileSync(data + '/settings.json', JSON.stringify(o, null, 2)); // commit changes to disk