title: Conditional spread element
body: <pre><code>const cond = false
  
  const extraInfo = [
    {
      a: 11,
      b: 25
    },
    {
      a: 12,
      b: 34
    },
    {
      a: 1,
      c: 99
    }
  ]
  
  const userInfo = [
    {
      z: 8
    },
    {
      z: 10
    },
    ...(cond &amp;&amp; extraInfo)
  ]
  </code></pre>
  
  <p>When <code>cond</code> is true, I want both extra and user info.</p>
  
  <p>When <code>cond</code> is false, only userInfo is needed.</p>
  
  <p>The issue is when <code>cond</code> is false, I get</p>
  
  <blockquote>
    <p>TypeError: (intermediate value)(intermediate value)(intermediate value)[Symbol.iterator] is not a function</p>
  </blockquote>
  
  <p>My understanding is that I am not allowed to use a boolean as a spread element, in this case <code>...false</code>.</p>
  
  <p>But <code>...( cond ? extraInfo : {} )</code> doesn't seem to work either.</p>
  
  <p>What is going on?</p>