diff options
author | 2024-07-01 13:56:26 +0000 | |
---|---|---|
committer | 2024-07-01 13:56:26 +0000 | |
commit | d958e085769fe04f2a396cc695208ea5f7afbabc (patch) | |
tree | 2e54089f35266edcf7acdedda8c3869746bc1715 | |
parent | a55ee0268e1ca22597e9b5e6d1f24b4f28ad978b (diff) | |
download | astro-d958e085769fe04f2a396cc695208ea5f7afbabc.tar.gz astro-d958e085769fe04f2a396cc695208ea5f7afbabc.tar.zst astro-d958e085769fe04f2a396cc695208ea5f7afbabc.zip |
[ci] format
-rw-r--r-- | packages/astro/src/core/render-context.ts | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/packages/astro/src/core/render-context.ts b/packages/astro/src/core/render-context.ts index d35e635e0..910ee679e 100644 --- a/packages/astro/src/core/render-context.ts +++ b/packages/astro/src/core/render-context.ts @@ -234,20 +234,20 @@ export class RenderContext { async #executeRewrite(reroutePayload: RewritePayload) { this.pipeline.logger.debug('router', 'Calling rewrite: ', reroutePayload); if (!this.pipeline.manifest.rewritingEnabled) { - this.pipeline.logger.error( - 'router', - 'The rewrite API is experimental. To use this feature, add the `rewriting` flag to the `experimental` object in your Astro config.' - ); - return new Response( - 'The rewrite API is experimental. To use this feature, add the `rewriting` flag to the `experimental` object in your Astro config.', - { - status: 500, - statusText: - 'The rewrite API is experimental. To use this feature, add the `rewriting` flag to the `experimental` object in your Astro config.', - } - ); - } - const [routeData, component, newURL] = await this.pipeline.tryRewrite( + this.pipeline.logger.error( + 'router', + 'The rewrite API is experimental. To use this feature, add the `rewriting` flag to the `experimental` object in your Astro config.' + ); + return new Response( + 'The rewrite API is experimental. To use this feature, add the `rewriting` flag to the `experimental` object in your Astro config.', + { + status: 500, + statusText: + 'The rewrite API is experimental. To use this feature, add the `rewriting` flag to the `experimental` object in your Astro config.', + } + ); + } + const [routeData, component, newURL] = await this.pipeline.tryRewrite( reroutePayload, this.request, this.originalRoute |