title: Sonarqube throws Review this usage of "array" as it can only be empty here
body: <p>I'm working on a react project and I have the following code.</p>
  <pre><code>const productsData = [];
  const resultArray = map(arr, currentIndex =&gt; {
     // some logic
  });
  
  return productsData.concat(...resultArray);
  </code></pre>
  <p>Now in sonarqube, the return statement throws <code>Review this usage of &quot;productsData&quot; as it can only be empty here</code>.</p>
  <p>My approach to solve this would be <code>return [...productsData, ...resultArray]</code>.</p>
  <p>Any thoughts on the solution?</p>