File tree 4 files changed +6
-4
lines changed
4 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -160,7 +160,8 @@ export function routes(
160
160
}
161
161
162
162
try {
163
- initialData = ( await getInitialData ( frameUrl ) ) as Bootstrap [ 'data' ]
163
+ if ( frameUrl )
164
+ initialData = ( await getInitialData ( frameUrl ) ) as Bootstrap [ 'data' ]
164
165
} catch ( error ) {
165
166
if ( error instanceof HTTPException ) throw error
166
167
}
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ export function getImagePaths(path: string) {
4
4
5
5
// skip the first split result as it's empty
6
6
for ( let i = 1 ; i < pathParts . length ; i ++ ) {
7
- if ( ! pathParts [ i ] . startsWith ( ':' ) || ! pathParts [ i ] . endsWith ( '?' ) ) continue
7
+ if ( ! pathParts [ i ] ? .startsWith ( ':' ) || ! pathParts [ i ] ? .endsWith ( '?' ) ) continue
8
8
imagePaths . push ( `${ pathParts . slice ( 0 , i ) . join ( '/' ) } /image` )
9
9
}
10
10
imagePaths . push ( `${ path } /image` )
Original file line number Diff line number Diff line change 1
- export function parsePath ( path_ : string ) {
2
- let path = path_ . split ( '?' ) [ 0 ]
1
+ export function parsePath ( path_ : string ) : string {
2
+ let path = path_ . split ( '?' ) [ 0 ] !
3
3
if ( path . endsWith ( '/' ) ) path = path . slice ( 0 , - 1 )
4
4
return path
5
5
}
Original file line number Diff line number Diff line change 11
11
"useDefineForClassFields" : true , // Not enabled by default in `strict` mode unless we bump `target` to ES2022.
12
12
"noFallthroughCasesInSwitch" : true , // Not enabled by default in `strict` mode.
13
13
"noImplicitReturns" : true , // Not enabled by default in `strict` mode.
14
+ "noUncheckedIndexedAccess" : true ,
14
15
"useUnknownInCatchVariables" : true , // TODO: This would normally be enabled in `strict` mode but would require some adjustments to the codebase.
15
16
"noImplicitOverride" : true , // Not enabled by default in `strict` mode.
16
17
"noUnusedLocals" : true , // Not enabled by default in `strict` mode.
You can’t perform that action at this time.
0 commit comments