Commit f60f1c3f by Ryan McKinley Committed by GitHub

Chore: use Array.isArray rather than lodash (#27898)

parent 71a01a10
import { Field, DataFrame, DataFrameDTO, FieldDTO, FieldType } from '../types/dataFrame';
import { KeyValue, QueryResultMeta } from '../types/data';
import { guessFieldTypeFromValue, guessFieldTypeForField, toDataFrameDTO } from './processDataFrame';
import isArray from 'lodash/isArray';
import isString from 'lodash/isString';
import { makeFieldParser } from '../utils/fieldParser';
import { MutableVector, Vector } from '../types/vector';
......@@ -79,7 +78,7 @@ export class MutableDataFrame<T = any> extends FunctionalVector<T> implements Da
let buffer: any[] | undefined = undefined;
if (f.values) {
if (isArray(f.values)) {
if (Array.isArray(f.values)) {
buffer = f.values as any[];
} else {
buffer = (f.values as Vector).toArray();
......
import React, { PureComponent } from 'react';
import isArray from 'lodash/isArray';
import difference from 'lodash/difference';
import { Select } from '../Select/Select';
......@@ -55,7 +54,7 @@ export class StatsPicker extends PureComponent<Props> {
onSelectionChange = (item: SelectableValue<string>) => {
const { onChange } = this.props;
if (isArray(item)) {
if (Array.isArray(item)) {
onChange(item.map(v => v.value));
} else {
onChange(item && item.value ? [item.value] : []);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment