Skip to content
This repository has been archived by the owner on Jul 11, 2023. It is now read-only.

Commit

Permalink
refactor(lodash): remove flatten (#695)
Browse files Browse the repository at this point in the history
derivedQueries is an array, where each element is an array as well.

mainQueries is an array.
  • Loading branch information
Haroenv committed Nov 18, 2019
1 parent 7ceea2f commit 9da0e08
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/algoliasearch.helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ var requestBuilder = require('./requestBuilder');
var events = require('events');
var inherits = require('./functions/inherits');

var flatten = require('lodash/flatten');
var isEmpty = require('lodash/isEmpty');

var version = require('./version');
Expand Down Expand Up @@ -1259,7 +1258,7 @@ AlgoliaSearchHelper.prototype._search = function() {
return queries;
});

var queries = mainQueries.concat(flatten(derivedQueries));
var queries = Array.prototype.concat.apply(mainQueries, derivedQueries);
var queryId = this._queryId++;

this._currentNbQueries++;
Expand Down

0 comments on commit 9da0e08

Please sign in to comment.