@trackunit/react-graphql-hooks 0.0.99 → 0.0.102
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.cjs.js +1 -1
- package/index.esm.js +2 -2
- package/package.json +1 -1
package/index.cjs.js
CHANGED
|
@@ -184,7 +184,7 @@ const usePaginationQuery = (document, props) => {
|
|
|
184
184
|
// https://github.com/apollographql/apollo-client/issues/8677
|
|
185
185
|
if (prev) {
|
|
186
186
|
// eslint-disable-next-line local-rules/no-typescript-assertion
|
|
187
|
-
return
|
|
187
|
+
return sharedUtils.objectKeys(prev).length === 0 ? undefined : prev;
|
|
188
188
|
}
|
|
189
189
|
// eslint-disable-next-line local-rules/no-typescript-assertion
|
|
190
190
|
return undefined;
|
package/index.esm.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import 'react/jsx-runtime';
|
|
2
2
|
import { registerTranslations } from '@trackunit/i18n-library-translation';
|
|
3
|
-
import { truthy } from '@trackunit/shared-utils';
|
|
3
|
+
import { truthy, objectKeys } from '@trackunit/shared-utils';
|
|
4
4
|
import * as ApolloClient from '@apollo/client';
|
|
5
5
|
import { useRelayPagination } from '@trackunit/react-table-pagination';
|
|
6
6
|
import { useState, useCallback, useEffect, useMemo } from 'react';
|
|
@@ -160,7 +160,7 @@ const usePaginationQuery = (document, props) => {
|
|
|
160
160
|
// https://github.com/apollographql/apollo-client/issues/8677
|
|
161
161
|
if (prev) {
|
|
162
162
|
// eslint-disable-next-line local-rules/no-typescript-assertion
|
|
163
|
-
return
|
|
163
|
+
return objectKeys(prev).length === 0 ? undefined : prev;
|
|
164
164
|
}
|
|
165
165
|
// eslint-disable-next-line local-rules/no-typescript-assertion
|
|
166
166
|
return undefined;
|