Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion errors.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,6 @@
"38": "Cannot refetch a query that has not been started yet.",
"39": "called \\`injectEndpoints\\` to override already-existing endpointName without specifying \\`overrideExisting: true\\`",
"40": "maxPages for endpoint '' must be a number greater than 0",
"41": "getPreviousPageParam for endpoint '' must be a function if maxPages is used"
"41": "getPreviousPageParam for endpoint '' must be a function if maxPages is used",
"42": "Duplicate middleware references found when creating the store. Ensure that each middleware is only included once."
}
2 changes: 1 addition & 1 deletion packages/toolkit/src/configureStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ export function configureStore<
finalMiddleware.forEach((middleware) => {
if (middlewareReferences.has(middleware)) {
throw new Error(
'Duplicate middleware found. Ensure that each middleware is only included once',
'Duplicate middleware references found when creating the store. Ensure that each middleware is only included once.',
)
}
middlewareReferences.add(middleware)
Expand Down
2 changes: 1 addition & 1 deletion packages/toolkit/src/query/tests/injectEndpoints.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ describe('injectEndpoints', () => {
})

expect(makeStore).toThrowError(
'Duplicate middleware found. Ensure that each middleware is only included once',
'Duplicate middleware references found when creating the store. Ensure that each middleware is only included once.',
)
})
})
2 changes: 1 addition & 1 deletion packages/toolkit/src/tests/configureStore.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ describe('configureStore', async () => {
}

expect(makeStore).toThrowError(
'Duplicate middleware found. Ensure that each middleware is only included once',
'Duplicate middleware references found when creating the store. Ensure that each middleware is only included once.',
)
})

Expand Down