mirror of
https://github.com/cheveguerra/bot-whatsapp.git
synced 2026-04-21 04:59:15 +00:00
refactor(bot): 🔥 refactor child nested cbs
This commit is contained in:
@@ -49,7 +49,8 @@ const addAnswer =
|
|||||||
* Esta funcion aplana y busca los callback anidados de los hijos
|
* Esta funcion aplana y busca los callback anidados de los hijos
|
||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
const getCbFromNested = () => flatObject(nested)
|
const getCbFromNested = () =>
|
||||||
|
flatObject(Array.isArray(nested) ? nested : [nested])
|
||||||
|
|
||||||
const callback = typeof cb === 'function' ? cb : () => null
|
const callback = typeof cb === 'function' ? cb : () => null
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user