Skip to content

Commit 25a0f6f

Browse files
author
ben.durrant
committed
simplify isThisApiSliceAction
1 parent 9e6304d commit 25a0f6f

File tree

1 file changed

+2
-7
lines changed
  • packages/toolkit/src/query/core/buildMiddleware

1 file changed

+2
-7
lines changed

packages/toolkit/src/query/core/buildMiddleware/index.ts

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,8 @@ export function buildMiddleware<
4040
>(`${reducerPath}/invalidateTags`),
4141
}
4242

43-
const isThisApiSliceAction = (action: Action) => {
44-
return (
45-
!!action &&
46-
typeof action.type === 'string' &&
47-
action.type.startsWith(`${reducerPath}/`)
48-
)
49-
}
43+
const isThisApiSliceAction = (action: Action) =>
44+
action.type.startsWith(`${reducerPath}/`)
5045

5146
const handlerBuilders: InternalHandlerBuilder[] = [
5247
buildDevCheckHandler,

0 commit comments

Comments
 (0)