File tree Expand file tree Collapse file tree 2 files changed +3
-8
lines changed
packages/toolkit/src/dynamicMiddleware Expand file tree Collapse file tree 2 files changed +3
-8
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ import type {
4
4
UnknownAction ,
5
5
} from 'redux'
6
6
import { compose } from 'redux'
7
- import { createAction , isAction } from '../createAction'
7
+ import { createAction } from '../createAction'
8
8
import { isAllOf } from '../matchers'
9
9
import { nanoid } from '../nanoid'
10
10
import { emplace , find } from '../utils'
@@ -75,11 +75,7 @@ export const createDynamicMiddleware = <
75
75
return compose ( ...appliedMiddleware )
76
76
}
77
77
78
- const isWithMiddleware = isAllOf (
79
- isAction ,
80
- withMiddleware ,
81
- matchInstance ( instanceId )
82
- )
78
+ const isWithMiddleware = isAllOf ( withMiddleware , matchInstance ( instanceId ) )
83
79
84
80
const middleware : DynamicMiddleware < State , Dispatch > =
85
81
( api ) => ( next ) => ( action ) => {
Original file line number Diff line number Diff line change @@ -2,7 +2,6 @@ import type { Middleware } from 'redux'
2
2
import { createDynamicMiddleware } from '../index'
3
3
import { configureStore } from '../../configureStore'
4
4
import type { BaseActionCreator , PayloadAction } from '../../createAction'
5
- import { isAction } from '../../createAction'
6
5
import { createAction } from '../../createAction'
7
6
import { isAllOf } from '../../matchers'
8
7
@@ -25,7 +24,7 @@ export const makeProbeableMiddleware = <Id extends number>(
25
24
) : Middleware < {
26
25
( action : PayloadAction < Id , typeof probeType > ) : Id
27
26
} > => {
28
- const isMiddlewareAction = isAllOf ( isAction , probeMiddleware , matchId ( id ) )
27
+ const isMiddlewareAction = isAllOf ( probeMiddleware , matchId ( id ) )
29
28
return ( api ) => ( next ) => ( action ) => {
30
29
if ( isMiddlewareAction ( action ) ) {
31
30
return id
You can’t perform that action at this time.
0 commit comments