Skip to content

Commit

Permalink
removing _
Browse files Browse the repository at this point in the history
  • Loading branch information
jgowdyelastic committed Aug 11, 2020
1 parent 90bde32 commit 69bd3bf
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions x-pack/plugins/ml/public/application/util/time_buckets.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
* you may not use this file except in compliance with the Elastic License.
*/

import _ from 'lodash';
import isPlainObject from 'lodash/isPlainObject';
import isString from 'lodash/isString';
// import ary from 'lodash/ary';
import ary from 'lodash/ary';
import sortBy from 'lodash/sortBy';
import assign from 'lodash/assign';
import moment from 'moment';
import dateMath from '@elastic/datemath';
Expand Down Expand Up @@ -91,9 +91,9 @@ TimeBuckets.prototype.setBounds = function (input) {
bounds = Array.isArray(input) ? input : [];
}

const moments = _(bounds).map(_.ary(moment, 1)).sortBy(Number);
const moments = sortBy(bounds.map(ary(moment, 1)), Number);

const valid = moments.size() === 2 && moments.every(isValidMoment);
const valid = moments.length === 2 && moments.every(isValidMoment);
if (!valid) {
this.clearBounds();
throw new Error('invalid bounds set: ' + input);
Expand Down

0 comments on commit 69bd3bf

Please sign in to comment.