Skip to content

Commit

Permalink
fix types
Browse files Browse the repository at this point in the history
  • Loading branch information
zbycz committed Jan 12, 2025
1 parent f7dd272 commit 71ad4fa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/services/fetchCache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export const getKey = (url: string, opts: Record<string, any>) => {
return url + JSON.stringify(opts);
};

export const getCache = (key: string) => {
export const getCache = (key: string | false) => {
if (key) {
return fetchCache.get(key);
}
Expand All @@ -44,7 +44,7 @@ export const removeFetchCache = (
}
};

export const writeCacheSafe = (key: string, value: string) => {
export const writeCacheSafe = (key: string | false, value: string) => {
if (!key) return;

try {
Expand Down

0 comments on commit 71ad4fa

Please sign in to comment.