Skip to content

Commit

Permalink
Reuse isObject
Browse files Browse the repository at this point in the history
  • Loading branch information
m4theushw committed Feb 16, 2023
1 parent 7bad452 commit ea6384b
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,12 @@ import { GridSingleSelectColDef, ValueOptions } from '../models/colDef/gridColDe
import { renderEditSingleSelectCell } from '../components/cell/GridEditSingleSelectCell';
import { getGridSingleSelectOperators } from './gridSingleSelectOperators';
import { isSingleSelectColDef } from '../components/panel/filterPanel/filterPanelUtils';
import { isObject } from '../utils/utils';

const isArrayOfObjects = (options: any): options is Array<Record<string, any>> => {
return typeof options[0] === 'object';
};

function isObject(value: any): value is Record<string, any> {
return typeof value === 'object' && value !== null;
}

const defaultGetOptionValue = (value: ValueOptions) => {
return isObject(value) ? value.value : value;
};
Expand Down

0 comments on commit ea6384b

Please sign in to comment.