Skip to content

Commit 1df903f

Browse files
committed
Fix #167
1 parent 4a375ab commit 1df903f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: Mime.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ class Mime {
4747
*/
4848
getType(path) {
4949
path = String(path);
50-
var last = path.replace(/.*[/\\]/, '').toLowerCase();
51-
var ext = last.replace(/.*\./, '').toLowerCase();
50+
var last = path.replace(/^.*[/\\]/, '').toLowerCase();
51+
var ext = last.replace(/^.*\./, '').toLowerCase();
5252

5353
var hasPath = last.length < path.length;
5454
var hasDot = ext.length < last.length - 1;

0 commit comments

Comments
 (0)