Skip to content

Commit

Permalink
Fixed formatting issues.
Browse files Browse the repository at this point in the history
  • Loading branch information
isaac-mcfadyen committed Dec 21, 2021
1 parent 71a688c commit 64c1047
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions packages/adapter-cloudflare/files/worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,15 @@ init();
export default {
async fetch(req, env) {
const url = new URL(req.url);

// check generated asset_set for static files
let pathname = url.pathname.substring(1);
try {
pathname = decodeURIComponent(pathname);
} catch (err) {
// ignore
}
let pathname = url.pathname.substring(1);
try {
pathname = decodeURIComponent(pathname);
} catch (err) {
// ignore
}

if (ASSETS.has(pathname)) {
return env.ASSETS.fetch(req);
}
Expand Down

0 comments on commit 64c1047

Please sign in to comment.