Skip to content

Commit 1485907

Browse files
authored
fix: fallback to lastModifiedAt (#618)
1 parent ce7d131 commit 1485907

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

.changeset/cold-ants-bow.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: fallback to lastModified and createdAt if updatedAt is undefined

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ export const createUrlFetcher = (
3131
const { data: fileInfo } = await fileApi.info(path);
3232
if (!fileInfo) return;
3333
params = {
34-
updated_at: fileInfo.updatedAt,
34+
updated_at:
35+
fileInfo.updatedAt || fileInfo.lastModified || fileInfo.createdAt,
3536
};
3637
}
3738

0 commit comments

Comments
 (0)