From 0c850d47d79ec8ae47a868721990e620fb9b0a9d Mon Sep 17 00:00:00 2001 From: Leifer Mendez Date: Sat, 19 Nov 2022 21:09:26 +0100 Subject: [PATCH] removed ctx --- packages/bot/io/flow.class.js | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/packages/bot/io/flow.class.js b/packages/bot/io/flow.class.js index a031b57..af4fc29 100644 --- a/packages/bot/io/flow.class.js +++ b/packages/bot/io/flow.class.js @@ -7,18 +7,6 @@ class FlowClass { flowRaw = [] constructor(_flow) { if (!Array.isArray(_flow)) throw new Error('Esto debe ser un ARRAY') - _flow.forEach((ctxFlow, parentIndex) => { - const callbacks = ctxFlow.ctx?.callbacks || [] - const contexts = ctxFlow.ctx?.contexts || [] - - callbacks.forEach((deepCallbacks) => { - if (deepCallbacks && contexts[parentIndex]) { - const ctxChild = contexts[parentIndex] - deepCallbacks.callback(null, ctxChild) - } - }) - }) - this.flowRaw = _flow this.allContexts = _flow .map((ctxs) => ctxs.ctx.contexts)