File tree 1 file changed +9
-11
lines changed
1 file changed +9
-11
lines changed Original file line number Diff line number Diff line change @@ -77,19 +77,17 @@ function handleRequest(
77
77
stat = fs . statSync ( filename ) ;
78
78
} catch ( e ) {
79
79
const nameStats = path . parse ( filename ) ;
80
+ const maybeIndex = findClosestIndexFileForPath ( outputPath , filename . substr ( 1 ) ) ;
80
81
81
82
// if it's looks like an SPA path
82
- if ( nameStats . ext === '' ) {
83
- const maybeIndex = findClosestIndexFileForPath ( outputPath , filename . substr ( 1 ) ) ;
84
- if ( maybeIndex ) {
85
- filename = maybeIndex . replace ( path . sep + 'index.html' , '' ) ;
86
- try {
87
- stat = fs . statSync ( filename ) ;
88
- } catch ( e ) {
89
- // not found
90
- next ( ) ;
91
- return ;
92
- }
83
+ if ( nameStats . ext === '' && maybeIndex ) {
84
+ filename = maybeIndex . replace ( path . sep + 'index.html' , '' ) ;
85
+ try {
86
+ stat = fs . statSync ( filename ) ;
87
+ } catch ( e ) {
88
+ // not found
89
+ next ( ) ;
90
+ return ;
93
91
}
94
92
} else {
95
93
// not found
You can’t perform that action at this time.
0 commit comments