0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2025-03-24 23:21:57 -05:00

[ci] format

This commit is contained in:
Emanuele Stoppa 2024-06-11 12:00:00 +00:00 committed by astrobot-houston
parent 7d9aac376c
commit c5152dbea3
2 changed files with 11 additions and 5 deletions

View file

@ -13,7 +13,7 @@ import {
createModuleScriptElement,
createStylesheetElementSet,
} from '../core/render/ssr-element.js';
import {default404Page, DEFAULT_404_ROUTE} from '../core/routing/astro-designed-error-pages.js';
import { DEFAULT_404_ROUTE, default404Page } from '../core/routing/astro-designed-error-pages.js';
export class ContainerPipeline extends Pipeline {
/**
@ -70,7 +70,10 @@ export class ContainerPipeline extends Pipeline {
return { links, styles, scripts };
}
async tryRewrite(payload: RewritePayload, request: Request): Promise<[RouteData, ComponentInstance, URL]> {
async tryRewrite(
payload: RewritePayload,
request: Request
): Promise<[RouteData, ComponentInstance, URL]> {
let foundRoute: RouteData | undefined;
// options.manifest is the actual type that contains the information
let finalUrl: URL | undefined = undefined;

View file

@ -358,11 +358,14 @@ export class RenderContext {
slotValues: Record<string, any> | null
): AstroGlobal {
let astroPagePartial;
// During rewriting, we must recompute the Astro global, because we need to purge the previous params/props/etc.
// During rewriting, we must recompute the Astro global, because we need to purge the previous params/props/etc.
if (this.isRewriting) {
astroPagePartial = this.#astroPagePartial = this.createAstroPagePartial(result, astroStaticPartial);
astroPagePartial = this.#astroPagePartial = this.createAstroPagePartial(
result,
astroStaticPartial
);
} else {
// Create page partial with static partial so they can be cached together.
// Create page partial with static partial so they can be cached together.
astroPagePartial = this.#astroPagePartial ??= this.createAstroPagePartial(
result,
astroStaticPartial