mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-30 13:29:56 +00:00
Add an error when creating a recipe with no bags
This commit is contained in:
parent
f5fdd79c7f
commit
62b2fe3e2f
@ -186,6 +186,9 @@ SqlTiddlerStore.prototype.createRecipe = function(recipename,bagnames,descriptio
|
||||
if(validationBagNames) {
|
||||
return {message: validationBagNames};
|
||||
}
|
||||
if(bagnames.length === 0) {
|
||||
return {message: "Recipes must contain at least one bag"};
|
||||
}
|
||||
this.sqlTiddlerDatabase.createRecipe(recipename,bagnames,description);
|
||||
this.saveEntityStateTiddler({
|
||||
title: "recipes/" + recipename,
|
||||
|
Loading…
Reference in New Issue
Block a user