diff --git a/ui/mock-server.js b/ui/mock-server.js index 31b5d03..fc03b12 100644 --- a/ui/mock-server.js +++ b/ui/mock-server.js @@ -5,6 +5,7 @@ const app = express() const port = 3000 let showError = false +let showConfigError = false let maintenance = false let launcher = false let fileExists = false @@ -30,7 +31,7 @@ function progressSimulation (res) { } function returnConfig (res) { - if (showError) { + if (showConfigError) { res.status(500).json({}) return } @@ -144,6 +145,14 @@ process.argv.forEach((val, index) => { darkMode = true console.log('Simulating dark mode') break + case 'config-error': + showConfigError = true + console.log('Simulating configuration errors') + break + case 'error': + showError = true + console.log('Simulating errors') + break } }) diff --git a/ui/src/main.js b/ui/src/main.js index 9d3cf11..6544040 100644 --- a/ui/src/main.js +++ b/ui/src/main.js @@ -124,7 +124,7 @@ var app = new Vue({ methods: { exit: function () { axios.get('/api/exit').catch(function (msg) { - var searchLocation = app.metadata.install_path.length > 0 ? app.metadata.install_path + var searchLocation = (app.metadata.install_path && app.metadata.install_path.length > 0) ? app.metadata.install_path : i18n.t('error.location_unknown') app.$router.replace({