Skip to content

Commit cae799e

Browse files
test: fix
1 parent 692a9be commit cae799e

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/middleware.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,10 @@ function getFilenameFromUrl(context, url) {
201201
* @returns {FilenameWithExtra | undefined} filename when found, otherwise undefined
202202
*/
203203
const resolveIndex = (filename) => {
204+
if (index.length === 0) {
205+
return;
206+
}
207+
204208
filename = path.join(filename, index[0]);
205209

206210
let stats;

0 commit comments

Comments
 (0)