Skip to content

Commit 066432c

Browse files
committed
fix: only set IDs pending if they are number or string
1 parent b540d9e commit 066432c

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
@@ -403,7 +403,7 @@ export default function makeServiceMutations() {
403403
const isIdMethodPending = state[`isId${uppercaseMethod}Pending`] as ServiceState['isIdCreatePending']
404404
// if `id` is an array, ensure it doesn't have duplicates
405405
const ids = Array.isArray(id) ? [...new Set(id)] : [id]
406-
ids.forEach(id => isIdMethodPending.push(id))
406+
ids.forEach(id => { if(typeof id === 'number' || typeof id === 'string') isIdMethodPending.push(id) })
407407
},
408408
unsetIdPending(state, payload: { method: PendingIdServiceMethodName, id: Id | Id[] }): void {
409409
const { method, id } = payload

0 commit comments

Comments
 (0)