Add check for undefined list query
This commit is contained in:
parent
eec556d34a
commit
dd2dd797a1
1 changed files with 1 additions and 1 deletions
|
@ -20,7 +20,7 @@ import type {
|
||||||
} from './types';
|
} from './types';
|
||||||
|
|
||||||
export const splitPaginatedQuery = (key: any) => {
|
export const splitPaginatedQuery = (key: any) => {
|
||||||
const { startIndex, limit, ...filter } = key;
|
const { startIndex, limit, ...filter } = key || {};
|
||||||
|
|
||||||
if (startIndex !== undefined || limit !== undefined) {
|
if (startIndex !== undefined || limit !== undefined) {
|
||||||
return {
|
return {
|
||||||
|
|
Reference in a new issue