Skip to content

Commit fb8e00e

Browse files
committedDec 10, 2024·
fix(cloudflare-r2-binding): return null for non existing getItem
1 parent 13da5e5 commit fb8e00e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎src/drivers/cloudflare-r2-binding.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ export default defineDriver((opts: CloudflareR2Options = {}) => {
4545
getItem(key, topts) {
4646
key = r(key);
4747
const binding = getR2Binding(opts.binding);
48-
return binding.get(key, topts).then((r) => r?.text());
48+
return binding.get(key, topts).then((r) => r?.text() ?? null);
4949
},
5050
getItemRaw(key, topts) {
5151
key = r(key);

0 commit comments

Comments
 (0)
Please sign in to comment.