mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-20 14:56:19 -04:00
Add support for async ops using async/await
This commit is contained in:
parent
07bb095e73
commit
c39622ed1e
5 changed files with 11 additions and 11 deletions
|
@ -38,7 +38,7 @@ const FlowControl = {
|
|||
* @param {Operation[]} state.opList - The list of operations in the recipe.
|
||||
* @returns {Object} The updated state of the recipe.
|
||||
*/
|
||||
runFork: function(state) {
|
||||
runFork: async function(state) {
|
||||
var opList = state.opList,
|
||||
inputType = opList[state.progress].inputType,
|
||||
outputType = opList[state.progress].outputType,
|
||||
|
@ -73,7 +73,7 @@ const FlowControl = {
|
|||
for (i = 0; i < inputs.length; i++) {
|
||||
var dish = new Dish(inputs[i], inputType);
|
||||
try {
|
||||
progress = recipe.execute(dish, 0);
|
||||
progress = await recipe.execute(dish, 0);
|
||||
} catch (err) {
|
||||
if (!ignoreErrors) {
|
||||
throw err;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue