Skip to content

Commit 6a1e05b

Browse files
committed
Fixed edge case where content type is not provided
1 parent dfbd387 commit 6a1e05b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/resource-mapper.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ 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.includes('text/html') || contentType.includes('*/*'))) {
74+
if (contentType && !(contentType.includes('text/html') || contentType.includes('*/*'))) {
7575
match = ''
7676
}
7777
if (match === undefined) {

0 commit comments

Comments
 (0)