Skip to content

Commit

Permalink
rename
Browse files Browse the repository at this point in the history
  • Loading branch information
ematipico committed May 7, 2024
1 parent a63885f commit b4f482e
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions packages/astro/src/core/render-context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ export class RenderContext {
) {}

/**
* A flag that tells the render content if the rerouting was triggered
* A flag that tells the render content if the rewriting was triggered
*/
isRerouting = false;
isRewriting = false;
/**
* A safety net in case of loops
*/
Expand Down Expand Up @@ -125,7 +125,7 @@ export class RenderContext {
statusText: 'Not found',
});
} finally {
this.isRerouting = true;
this.isRewriting = true;
}
} else {
this.pipeline.logger.warn(
Expand Down Expand Up @@ -163,7 +163,7 @@ export class RenderContext {
if (
this.routeData.route === '/404' ||
this.routeData.route === '/500' ||
this.isRerouting
this.isRewriting
) {
response.headers.set(REROUTE_DIRECTIVE_HEADER, 'no');
}
Expand Down Expand Up @@ -215,7 +215,7 @@ export class RenderContext {
this.url = new URL(this.request.url);
this.cookies = new AstroCookies(this.request);
this.params = getParams(routeData, url.toString());
this.isRerouting = true;
this.isRewriting = true;
return await this.render(component);
} catch (e) {
pipeline.logger.debug('router', 'Rewrite failed.', e);
Expand Down Expand Up @@ -402,7 +402,7 @@ export class RenderContext {
this.url = new URL(this.request.url);
this.cookies = new AstroCookies(this.request);
this.params = getParams(routeData, url.toString());
this.isRerouting = true;
this.isRewriting = true;
return await this.render(component);
} catch (e) {
pipeline.logger.debug('router', 'Rerouting failed, returning a 404.', e);
Expand Down

0 comments on commit b4f482e

Please sign in to comment.