Skip to content

Commit 088103b

Browse files
committed
fix(embedded): Replace lodash partition with plain filters in setDataMask
1 parent aad2835 commit 088103b

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

  • superset-frontend/src/embedded

‎superset-frontend/src/embedded/api.tsx‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
import { DataMaskStateWithId, JsonObject } from '@superset-ui/core';
2020
import { logging } from '@apache-superset/core/utils';
2121
import getBootstrapData from 'src/utils/getBootstrapData';
22-
import { partition } from 'lodash';
2322
import { batch } from 'react-redux';
2423
import { store } from '../views/store';
2524
import { getDashboardPermalink as getDashboardPermalinkUtil } from '../utils/urlUtils';
@@ -98,9 +97,9 @@ const applyDataMask = (dataMask: DataMaskStateWithId) => {
9897
// alongside the mask — would otherwise be inserted as a bogus filter and
9998
// treated as a globally scoped filter by the active-filter derivation.
10099
const knownFilterIds = new Set(Object.keys(getDataMask()));
101-
const [applicable, ignored] = partition(Object.entries(dataMask), ([id]) =>
102-
knownFilterIds.has(id),
103-
);
100+
const entries = Object.entries(dataMask);
101+
const applicable = entries.filter(([id]) => knownFilterIds.has(id));
102+
const ignored = entries.filter(([id]) => !knownFilterIds.has(id));
104103

105104
if (ignored.length) {
106105
logging.warn(

0 commit comments

Comments
 (0)