Skip to content

Commit 6400b71

Browse files
ci: apply automated fixes
1 parent 1bc935c commit 6400b71

File tree

2 files changed

+3
-11
lines changed

2 files changed

+3
-11
lines changed

packages/start-plugin-core/src/prerender.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ export async function prerender({
7070
pathToFileURL(fullEntryFilePath).toString()
7171
)
7272

73-
7473
const isRedirectResponse = (res: Response) => {
7574
return res.status >= 300 && res.status < 400 && res.headers.get('location')
7675
}
@@ -82,10 +81,7 @@ export async function prerender({
8281
const url = new URL(`http://localhost${path}`)
8382
const response = await serverEntrypoint.fetch(new Request(url, options))
8483

85-
if (
86-
isRedirectResponse(response) &&
87-
maxRedirects > 0
88-
) {
84+
if (isRedirectResponse(response) && maxRedirects > 0) {
8985
const location = response.headers.get('location')!
9086
if (location.startsWith('http://localhost') || location.startsWith('/')) {
9187
const newUrl = location.replace('http://localhost', '')
@@ -294,5 +290,3 @@ export async function writeBundleToDisk({
294290
await fsp.writeFile(fullPath, content)
295291
}
296292
}
297-
298-

packages/start-plugin-core/src/start-router-plugin/generator-plugins/prerender-routes-plugin.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
21
import { inferFullPath } from '@tanstack/router-generator'
3-
import type {GeneratorPlugin, RouteNode} from '@tanstack/router-generator';
2+
import type { GeneratorPlugin, RouteNode } from '@tanstack/router-generator'
43

54
/**
65
* this plugin gets the prerenderable paths and stores it on globalThis
@@ -15,7 +14,6 @@ export function prerenderRoutesPlugin(): GeneratorPlugin {
1514
}
1615
}
1716

18-
1917
function getPrerenderablePaths(
2018
routeNodes: Array<RouteNode>,
2119
): Array<{ path: string }> {
@@ -37,4 +35,4 @@ function getPrerenderablePaths(
3735
}
3836

3937
return Array.from(paths).map((path) => ({ path }))
40-
}
38+
}

0 commit comments

Comments
 (0)