From 21688383659b902e7e9fee22fb812ffb52f4a4ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rodrigo=20Ram=C3=ADrez=20Norambuena?= Date: Sun, 5 Mar 2017 22:05:54 -0300 Subject: [PATCH] Use just one callback statement in case of failure on loader of the configuration file. --- js/app.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/js/app.js b/js/app.js index 6c1f6ea2..f8825f7e 100644 --- a/js/app.js +++ b/js/app.js @@ -69,14 +69,12 @@ var App = function() { } catch (e) { if (e.code == "ENOENT") { console.error("WARNING! Could not find config file. Please create one. Starting with default configuration."); - callback(defaults); } else if (e instanceof ReferenceError || e instanceof SyntaxError) { console.error("WARNING! Could not validate config file. Please correct syntax errors. Starting with default configuration."); - callback(defaults); } else { console.error("WARNING! Could not load config file. Starting with default configuration. Error found: " + e); - callback(defaults); } + callback(defaults); } };