Skip to content

Commit

Permalink
FIxes #5
Browse files Browse the repository at this point in the history
  • Loading branch information
f2face committed Sep 15, 2024
1 parent afc2575 commit 6cd4ea3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "node-cloudflare-r2",
"version": "0.3.0",
"version": "0.3.1",
"description": "S3 wrapper for Cloudflare R2.",
"main": "./lib/index.js",
"scripts": {
Expand Down
6 changes: 5 additions & 1 deletion src/Bucket.ts
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,11 @@ export class Bucket {
})
);

return result.$metadata.httpStatusCode === 200;
return (
result.$metadata.httpStatusCode &&
result.$metadata.httpStatusCode >= 200 &&
result.$metadata.httpStatusCode < 300
);
}

/**
Expand Down

0 comments on commit 6cd4ea3

Please sign in to comment.