Skip to content

Commit 0e147e9

Browse files
committed
Prevent error when params.query is assumed
Since Feathers can assume that no query object means to use `{}`, the assumption can be safely assumed in the updatePaginationForQuery mutation.
1 parent f29a768 commit 0e147e9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/service-module/service-module.mutations.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ export default function makeServiceMutations() {
266266
* Stores pagination data on state.pagination based on the query identifier
267267
* (qid) The qid must be manually assigned to `params.qid`
268268
*/
269-
updatePaginationForQuery(state, { qid, response, query }) {
269+
updatePaginationForQuery(state, { qid, response, query = {} }) {
270270
const { data, total } = response
271271
const { idField } = state
272272
const ids = data.map(i => i[idField])

0 commit comments

Comments
 (0)