Skip to content

Commit

Permalink
Merge pull request #1520 from MetaPhase-Consulting/fix/flat
Browse files Browse the repository at this point in the history
Use lodash flatten instead of native flat
  • Loading branch information
mjoyce91 committed May 25, 2021
2 parents e29a8b8 + 47fdac6 commit 42236f9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Components/BureauPage/PositionManager/PositionManager.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import PropTypes from 'prop-types';
import { BUREAU_POSITION_SORT, POSITION_MANAGER_PAGE_SIZES } from 'Constants/Sort';
import { BUREAU_PERMISSIONS, BUREAU_USER_SELECTIONS, FILTERS_PARENT, ORG_PERMISSIONS, POSITION_SEARCH_RESULTS } from 'Constants/PropTypes';
import Picky from 'react-picky';
import { get, has, isEmpty, pick, sortBy, throttle, uniqBy } from 'lodash';
import { flatten, get, has, isEmpty, pick, sortBy, throttle, uniqBy } from 'lodash';
import { bureauPositionsFetchData, downloadBureauPositionsData, saveBureauUserSelections } from 'actions/bureauPositions';
import Spinner from 'Components/Spinner';
import ExportButton from 'Components/ExportButton';
Expand Down Expand Up @@ -267,7 +267,7 @@ const PositionManager = props => {
selectedOrgs.filter(f => get(f, 'code') !== defaultOrgCode),
selectedBureaus.filter(f => get(f, 'code') !== defaultBureauCode),
];
if (isEmpty(filters.flat()) && isEmpty(textSearch)) {
if (isEmpty(flatten(filters)) && isEmpty(textSearch)) {
setClearFilters(false);
} else {
setClearFilters(true);
Expand Down

0 comments on commit 42236f9

Please sign in to comment.