Skip to content

Commit ee2cb2f

Browse files
committed
Fixed edge case involving files that are not index.html
1 parent 6a1e05b commit ee2cb2f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/resource-mapper.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,11 @@ class ResourceMapper {
7171
// Find a file with the same name (minus the dollar extension)
7272
let match = searchIndex ? await this._getMatchingFile(folder, filename, isIndex) : ''
7373
// Do not match with html if the content type won't allow it
74-
if (contentType && !(contentType.includes('text/html') || contentType.includes('*/*'))) {
74+
if (
75+
contentType &&
76+
!(contentType.includes('text/html') || contentType.includes('*/*')) &&
77+
match === 'index.html'
78+
) {
7579
match = ''
7680
}
7781
if (match === undefined) {

0 commit comments

Comments
 (0)