aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLibravatar haraldox <hnaumann+github@gmail.com>2018-02-28 16:33:21 +0100
committerLibravatar haraldox <hnaumann+github@gmail.com>2018-02-28 16:33:21 +0100
commitdd9f447042e45259c272a336a349ab7b1a04a2b6 (patch)
treeee3bb7ee6091d8f4b9dc0858aa2273ca72206eda /src
parentUpdate changelog (diff)
downloadferdium-app-dd9f447042e45259c272a336a349ab7b1a04a2b6.tar.gz
ferdium-app-dd9f447042e45259c272a336a349ab7b1a04a2b6.tar.zst
ferdium-app-dd9f447042e45259c272a336a349ab7b1a04a2b6.zip
REMOVE invalid semver version tantrum
catch Error to keep stacktrace
Diffstat (limited to 'src')
-rw-r--r--src/models/Recipe.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/models/Recipe.js b/src/models/Recipe.js
index 1fc23ac89..032a9aa19 100644
--- a/src/models/Recipe.js
+++ b/src/models/Recipe.js
@@ -32,8 +32,12 @@ export default class Recipe {
32 throw Error(`Recipe '${data.name}' requires Id`); 32 throw Error(`Recipe '${data.name}' requires Id`);
33 } 33 }
34 34
35 if (!semver.valid(data.version)) { 35 try {
36 throw Error(`Version ${data.version} of recipe '${data.name}' is not a valid semver version`); 36 if (!semver.valid(data.version)) {
37 throw Error(`Version ${data.version} of recipe '${data.name}' is not a valid semver version`);
38 }
39 } catch (e) {
40 console.warn(e.message);
37 } 41 }
38 42
39 this.id = data.id || this.id; 43 this.id = data.id || this.id;