/**
 * @module
 * @export {Function} findChild
 */

/**
 * Find element with specific class name within children, like selector '>'
 *
 * @param {Element} parentElem
 * @param {String} className
 *
 * @return {Element}: first matched child
 */
export const findChild = (parentElem, className) => {
    const children = parentElem.children;

    if (!children) return null;

    for (let elem of children) {
        if (elem.className.match(className)) return elem;
    }

    return null;
};

@@ -342,126 +342,214 @@
     
-if (!children) return null;%0A%0A    for (let elem of children) %7B%0A        if (elem.className.match(className)) return elem
+let res = null;%0A%0A    if (children) %7B%0A        %5B...children%5D.some(elem =%3E %7B%0A            if (elem.className.match(className)) %7B%0A                res = elem;%0A                return true;%0A            %7D%0A        %7D)
 ;%0A  
@@ -564,17 +564,16 @@
  return 
-null
+res
 ;%0A%7D;%0A

fix '[Symbol.iterator]' is undefined error