refactor(bot): 🔥 refactor child nested cbs

refactor(bot): 🔥 refactor child nested cbs
This commit is contained in:
Leifer Mendez
2022-12-30 15:29:09 +01:00
committed by GitHub

View File

@@ -49,7 +49,8 @@ const addAnswer =
* Esta funcion aplana y busca los callback anidados de los hijos
* @returns
*/
const getCbFromNested = () => flatObject(nested)
const getCbFromNested = () =>
flatObject(Array.isArray(nested) ? nested : [nested])
const callback = typeof cb === 'function' ? cb : () => null