Skip to content

Commit 08684fb

Browse files
committed
Trying to fix regex
1 parent 31f113a commit 08684fb

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
@@ -25,7 +25,7 @@ class ResourceMapper {
2525
this._defaultContentType = defaultContentType
2626
this._indexFilename = indexFilename
2727
this._types = { ...types, ...overrideTypes }
28-
this._isControlFile = new RegExp(`.(?:${fileSuffixes.join('|')})$`)
28+
this._isControlFile = new RegExp(`(?:${fileSuffixes.map(fs => fs.replace('.', '\\.')).join('|')})$`)
2929

3030
// If the host needs to be replaced on every call, pre-split the root URL
3131
if (includeHost) {

0 commit comments

Comments
 (0)