mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-23 00:06:17 -04:00
Update NodeRecipe so args is optional in bake config
This commit is contained in:
parent
e68fb51f44
commit
a8fbd5164e
3 changed files with 49 additions and 32 deletions
|
@ -44,10 +44,13 @@ class NodeRecipe {
|
|||
throw new TypeError("Inputted function not a Chef operation.");
|
||||
}
|
||||
// CASE: op with configuration
|
||||
} else if (ing.op && ing.args) {
|
||||
} else if (ing.op) {
|
||||
// Return op and args pair for opList item.
|
||||
const sanitisedOp = this._validateIngredient(ing.op);
|
||||
return {op: sanitisedOp, args: ing.args};
|
||||
if (ing.args) {
|
||||
return {op: sanitisedOp, args: ing.args};
|
||||
}
|
||||
return sanitisedOp;
|
||||
} else {
|
||||
throw new TypeError("Recipe can only contain function names or functions");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue