diff options
author | 2018-02-28 16:33:21 +0100 | |
---|---|---|
committer | 2018-02-28 16:33:21 +0100 | |
commit | dd9f447042e45259c272a336a349ab7b1a04a2b6 (patch) | |
tree | ee3bb7ee6091d8f4b9dc0858aa2273ca72206eda /src/models | |
parent | Update changelog (diff) | |
download | ferdium-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/models')
-rw-r--r-- | src/models/Recipe.js | 8 |
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; |