Array not being passed to query in knex
<p>I am passing an array of ids from a get query to a knex whereIn function but they are going missing.</p>

<pre><code>if(query.cols){
  var cols = query.cols.map(Number);
  console.log(cols)
  search.whereIn('collection_id', cols)
}
</code></pre>

<p>I am mapping them to Integers for the query. The console log is...</p>

<pre><code>[ 77, 66 ]
</code></pre>

<p>But the debug shows the query as...</p>

<pre><code>...and "collection_id" in (?, ?) 
</code></pre>

<p>What have I missed?</p>