Fallback to current location if defaultServer not set.

Issue #190.
This commit is contained in:
N-Pex 2021-12-14 09:53:09 +01:00
parent 51bd0a4cf8
commit 8942eacbf4

View file

@ -12,6 +12,10 @@ export default {
for (const key of Object.keys(json)) {
Vue.set(config, key, json[key]);
}
// If default server is not set, default to current server address
if (!json.defaultServer) {
Vue.set(config, "defaultServer", window.location.origin);
}
});
Vue.prototype.$config = config;
}