0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2025-01-06 22:10:10 -05:00

fix(cloudflare): base strip logic (#6550)

This commit is contained in:
Richard Simpson 2023-03-16 09:39:54 -05:00 committed by GitHub
parent ff5f1e89a1
commit 2c829fdf65
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

View file

@ -0,0 +1,5 @@
---
'@astrojs/cloudflare': patch
---
fix `config.base` trimming logic for cloudflare integration `_routes.json` generation

View file

@ -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}`;
}