Skip to content

Commit

Permalink
fix(cloudflare): base strip logic (#6550)
Browse files Browse the repository at this point in the history
  • Loading branch information
RichiCoder1 committed Mar 16, 2023
1 parent ff5f1e8 commit 2c829fd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/early-kangaroos-invent.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@astrojs/cloudflare': patch
---

fix `config.base` trimming logic for cloudflare integration `_routes.json` generation
2 changes: 1 addition & 1 deletion packages/integrations/cloudflare/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ export default function createIntegration(args?: Options): AstroIntegration {
let pagePath = prependForwardSlash(page.pathname);
if (_config.base !== '/') {
const base = _config.base.endsWith('/')
? _config.base.substring(0, -1)
? _config.base.slice(0, -1)
: _config.base;
pagePath = `${base}${pagePath}`;
}
Expand Down

0 comments on commit 2c829fd

Please sign in to comment.