Skip to content

Commit 855d0c4

Browse files
committedSep 25, 2017
Fix #167
1 parent 1f0af63 commit 855d0c4

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed
 

‎build/test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ assert.equal('application/font-woff', mime.lookup('file.woff'));
4545
assert.equal('application/octet-stream', mime.lookup('file.buffer'));
4646
// TODO: Uncomment once #157 is resolved
4747
// assert.equal('audio/mp4', mime.lookup('file.m4a'));
48-
assert.equal('font/opentype', mime.lookup('file.otf'));
48+
assert.equal('font/otf', mime.lookup('file.otf'));
4949

5050
//
5151
// Test charsets

‎mime.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ Mime.prototype.load = function(file) {
6767
* Lookup a mime type based on extension
6868
*/
6969
Mime.prototype.lookup = function(path, fallback) {
70-
var ext = path.replace(/.*[\.\/\\]/, '').toLowerCase();
70+
var ext = path.replace(/^.*[\.\/\\]/, '').toLowerCase();
7171

7272
return this.types[ext] || fallback || this.default_type;
7373
};

0 commit comments

Comments
 (0)
Please sign in to comment.