mirror of
https://github.com/gchq/CyberChef
synced 2025-12-11 22:03:22 +00:00
Add support for async ops using async/await
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user