title: promise.resolve() in for loop return undefined
body: <p>I've tried to get a tree node after search process. But it always return undefined.. 
  here's the code.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>const findOrder = (list, key) =&gt;
    new Promise((resolve) =&gt; {
      for (let i = 0; i &lt; list.length; i++) {
        // find node through key in tree
        if (list[i].key === key) {
          console.log(`================I got it!: `, list[i].children); // children[]
          resolve(list[i].children);
        }
        if (list[i].children) {
          findOrder(list[i].children, key);
        }
      }
    });
  
  const setOrder = async() =&gt; {
    const orders = await findOrder(
      treeData,
      dropObj.classKind === "1" ? keyGen(dropObj.key) : dropObj.key
    );
    console.log(`==================siblings: `, orders); // undefined
  };
  setOrder();</code></pre>
  </div>
  </div>
  </p>
  
  <p>what is the problem? </p>