mirror of
https://github.com/reduxjs/redux-devtools.git
synced 2025-07-26 16:09:50 +03:00
Remove unnecessary mapValues from extension
This commit is contained in:
parent
38af077a64
commit
f3f64490e3
|
@ -1,4 +1,3 @@
|
||||||
import { mapValues } from 'lodash-es';
|
|
||||||
import { Action } from 'redux';
|
import { Action } from 'redux';
|
||||||
import { LiftedState, PerformAction } from '@redux-devtools/instrument';
|
import { LiftedState, PerformAction } from '@redux-devtools/instrument';
|
||||||
import { LocalFilter } from '@redux-devtools/utils';
|
import { LocalFilter } from '@redux-devtools/utils';
|
||||||
|
@ -46,10 +45,15 @@ function filterActions<A extends Action<string>>(
|
||||||
actionSanitizer: ((action: A, id: number) => A) | undefined,
|
actionSanitizer: ((action: A, id: number) => A) | undefined,
|
||||||
): { [p: number]: PerformAction<A> } {
|
): { [p: number]: PerformAction<A> } {
|
||||||
if (!actionSanitizer) return actionsById;
|
if (!actionSanitizer) return actionsById;
|
||||||
return mapValues(actionsById, (action, id) => ({
|
return Object.fromEntries(
|
||||||
...action,
|
Object.entries(actionsById).map(([actionId, action]) => [
|
||||||
action: actionSanitizer(action.action, id as unknown as number),
|
actionId,
|
||||||
}));
|
{
|
||||||
|
...action,
|
||||||
|
action: actionSanitizer(action.action, actionId as unknown as number),
|
||||||
|
},
|
||||||
|
]),
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
function filterStates<S>(
|
function filterStates<S>(
|
||||||
|
|
Loading…
Reference in New Issue
Block a user