aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLibravatar Stefan Malzner <stefan@adlk.io>2017-11-03 23:59:23 +0100
committerLibravatar Stefan Malzner <stefan@adlk.io>2017-11-03 23:59:55 +0100
commit2e894d6d53a952bfae74f5b6b19040e505765416 (patch)
treed6addb769fc03c1e4a4bbb4dca016fa69de91f08 /src
parentfix eslint issue (diff)
downloadferdium-app-2e894d6d53a952bfae74f5b6b19040e505765416.tar.gz
ferdium-app-2e894d6d53a952bfae74f5b6b19040e505765416.tar.zst
ferdium-app-2e894d6d53a952bfae74f5b6b19040e505765416.zip
fix(App): Add checks to service url validation to prevent app freeze
Diffstat (limited to 'src')
-rw-r--r--src/models/Service.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/models/Service.js b/src/models/Service.js
index 7a0310ebc..484252e7c 100644
--- a/src/models/Service.js
+++ b/src/models/Service.js
@@ -58,7 +58,12 @@ export default class Service {
58 58
59 @computed get url() { 59 @computed get url() {
60 if (this.recipe.hasCustomUrl && this.customUrl) { 60 if (this.recipe.hasCustomUrl && this.customUrl) {
61 let url = normalizeUrl(this.customUrl); 61 let url;
62 try {
63 url = normalizeUrl(this.customUrl);
64 } catch (err) {
65 console.error(`Service (${this.recipe.name}): '${this.customUrl}' is not a valid Url.`);
66 }
62 67
63 if (typeof this.recipe.buildUrl === 'function') { 68 if (typeof this.recipe.buildUrl === 'function') {
64 url = this.recipe.buildUrl(url); 69 url = this.recipe.buildUrl(url);