Skip to content

Commit

Permalink
support multipart extensions
Browse files Browse the repository at this point in the history
  • Loading branch information
jordanstephens committed Sep 11, 2020
1 parent 69e1f3e commit e716568
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/cli/lookup-files.js
Expand Up @@ -45,9 +45,8 @@ function isHiddenOnUnix(pathname) {
* hasMatchingExtname('foo.html', ['js', 'css']); // => false
*/
function hasMatchingExtname(pathname, exts) {
var suffix = path.extname(pathname).slice(1);
return exts.some(function(element) {
return suffix === element;
return pathname.endsWith(element);
});
}

Expand Down

0 comments on commit e716568

Please sign in to comment.