diff options
Diffstat (limited to 'src/models/Recipe.ts')
-rw-r--r-- | src/models/Recipe.ts | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/models/Recipe.ts b/src/models/Recipe.ts index 33d383983..0a93fbc5a 100644 --- a/src/models/Recipe.ts +++ b/src/models/Recipe.ts | |||
@@ -76,12 +76,8 @@ export default class Recipe { | |||
76 | throw Error(`Recipe '${data.name}' requires Id`); | 76 | throw Error(`Recipe '${data.name}' requires Id`); |
77 | } | 77 | } |
78 | 78 | ||
79 | try { | 79 | if (!semver.valid(data.version)) { |
80 | if (!semver.valid(data.version)) { | 80 | throw Error(`Version ${data.version} of recipe '${data.name}' is not a valid semver version`); |
81 | throw Error(`Version ${data.version} of recipe '${data.name}' is not a valid semver version`); | ||
82 | } | ||
83 | } catch (e) { | ||
84 | console.warn(e.message); | ||
85 | } | 81 | } |
86 | 82 | ||
87 | this.id = data.id || this.id; | 83 | this.id = data.id || this.id; |