Skip to content
This repository has been archived by the owner on Feb 9, 2024. It is now read-only.

Commit

Permalink
Merge pull request #249 from cloudflare/cherry/remove-debug-logs
Browse files Browse the repository at this point in the history
  • Loading branch information
Cherry committed Oct 8, 2021
2 parents cee8263 + b7fba04 commit 159c178
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -231,10 +231,10 @@ const getAssetFromKV = async (event: FetchEvent, options?: Partial<Options>): Pr
if (response) {
if (response.status > 300 && response.status < 400) {
if (response.body && 'cancel' in Object.getPrototypeOf(response.body)) {
// Body exists and environment supports readable streams
response.body.cancel()
console.log('Body exists and environment supports readable streams. Body cancelled')
} else {
console.log('Environment doesnt support readable streams')
// Environment doesnt support readable streams, or null repsonse body. Nothing to do
}
response = new Response(null, response)
} else {
Expand Down

0 comments on commit 159c178

Please sign in to comment.