Skip to content

Commit

Permalink
chore: remove useless trycatch
Browse files Browse the repository at this point in the history
  • Loading branch information
Hebilicious committed Jun 7, 2023
1 parent 51f57f1 commit 553e13b
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions src/runtime/entries/cloudflare-pages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,10 @@ export default {
) {
const url = new URL(request.url);
if (isPublicAssetURL(url.pathname)) {
try {
const [match] = getPublicAssetMatch(url.pathname);
return await env.ASSETS.fetch(
new Request(new URL("http://localhost" + match))
);
} catch (error) {
console.error(error);
throw error;
}
const [match] = getPublicAssetMatch(url.pathname);
return await env.ASSETS.fetch(
new Request(new URL("http://localhost" + match))
);
}

let body;
Expand Down

0 comments on commit 553e13b

Please sign in to comment.