Skip to content

Commit 75f029e

Browse files
authored
fix/updated at (#623)
1 parent bb95686 commit 75f029e

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

.changeset/new-walls-wish.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@supabase-cache-helpers/storage-core": patch
3+
---
4+
5+
fix: properly select url cache key from info

packages/storage-core/src/url-fetcher.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,10 @@ export const createUrlFetcher = (
3030
if (!exists) return;
3131
const { data: fileInfo } = await fileApi.info(path);
3232
if (!fileInfo) return;
33+
const value = fileInfo.lastModified || fileInfo.updatedAt;
34+
if (!value) return;
3335
params = {
34-
updated_at:
35-
fileInfo.updatedAt || fileInfo.lastModified || fileInfo.createdAt,
36+
updated_at: value,
3637
};
3738
}
3839

0 commit comments

Comments
 (0)