diff options
Diffstat (limited to 'src/hooks/useAPIClient.ts')
-rw-r--r-- | src/hooks/useAPIClient.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/hooks/useAPIClient.ts b/src/hooks/useAPIClient.ts index fd3ee19..72997f5 100644 --- a/src/hooks/useAPIClient.ts +++ b/src/hooks/useAPIClient.ts @@ -29,8 +29,8 @@ const registerServiceHooks = <Item = any>(service: string): void => { if (!result.data && result.isValidating) { // If we are waiting for the first result, check if we can maybe // get the data from already cached list for the time-being - const item = _.find(preloadedItems, { _id }); - return { ...result, data: item } as Response<Item>; + const item = _.find(preloadedItems, { _id }) as Item; + return { ...result, data: item }; } return result; }; |