aboutsummaryrefslogtreecommitdiffstats
path: root/src/models
diff options
context:
space:
mode:
Diffstat (limited to 'src/models')
-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;