tableHasContent = table => {
      const tHead = table.children[0]
      const tBody = table.children[1]
      const tHeadHasContent = tHead.children[0].children.some(th => th.children[0].text.trim())
      const tBodyHasContent = tBody.children.some(row => row.children.some(td => td.children[0].text.trim()))
      return tHeadHasContent || tBodyHasContent
    }
<ul>
  <li>
    <p>other list item</p>
  </li>
  <li>
    <p>|text</p>
    <p>maybe has other paragraph</p>
  </li>
  <li>
    <p>other list item</p>
  </li>
<ul>
===>
<ul>
  <li>
    <p>other list item</p>
    <p>|text</p>
    <p>maybe has other paragraph</p>
  </li>
  <li>
    <p>other list item</p>
  </li>
<ul>