@@ -49,7 +49,7 @@ export async function respond(request, options, state) {
4949 /** @type {Record<string, string> } */
5050 let params = { } ;
5151
52- if ( options . paths . base && ! state . prerender ?. fallback ) {
52+ if ( options . paths . base && ! state . prerendering ?. fallback ) {
5353 if ( ! decoded . startsWith ( options . paths . base ) ) {
5454 return new Response ( undefined , { status : 404 } ) ;
5555 }
@@ -63,7 +63,7 @@ export async function respond(request, options, state) {
6363 url = new URL ( url . origin + url . pathname . slice ( 0 , - DATA_SUFFIX . length ) + url . search ) ;
6464 }
6565
66- if ( ! state . prerender || ! state . prerender . fallback ) {
66+ if ( ! state . prerendering ? .fallback ) {
6767 const matchers = await options . manifest . _ . matchers ( ) ;
6868
6969 for ( const candidate of options . manifest . _ . routes ) {
@@ -82,7 +82,7 @@ export async function respond(request, options, state) {
8282 if ( route ?. type === 'page' ) {
8383 const normalized = normalize_path ( url . pathname , options . trailing_slash ) ;
8484
85- if ( normalized !== url . pathname && ! state . prerender ?. fallback ) {
85+ if ( normalized !== url . pathname && ! state . prerendering ?. fallback ) {
8686 return new Response ( undefined , {
8787 status : 301 ,
8888 headers : {
@@ -173,7 +173,7 @@ export async function respond(request, options, state) {
173173 } ;
174174 }
175175
176- if ( state . prerender && state . prerender . fallback ) {
176+ if ( state . prerendering ? .fallback ) {
177177 return await render_response ( {
178178 event,
179179 options,
@@ -275,7 +275,7 @@ export async function respond(request, options, state) {
275275 } ) ;
276276 }
277277
278- if ( state . prerender ) {
278+ if ( state . prerendering ) {
279279 return new Response ( 'not found' , { status : 404 } ) ;
280280 }
281281
0 commit comments