Skip to content

Commit

Permalink
Fix #167
Browse files Browse the repository at this point in the history
  • Loading branch information
broofa committed Sep 25, 2017
1 parent 4a375ab commit 1df903f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Mime.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ class Mime {
*/
getType(path) {
path = String(path);
var last = path.replace(/.*[/\\]/, '').toLowerCase();
var ext = last.replace(/.*\./, '').toLowerCase();
var last = path.replace(/^.*[/\\]/, '').toLowerCase();
var ext = last.replace(/^.*\./, '').toLowerCase();

var hasPath = last.length < path.length;
var hasDot = ext.length < last.length - 1;
Expand Down

0 comments on commit 1df903f

Please sign in to comment.