Skip to content

Commit 2e00b5c

Browse files
authoredApr 5, 2019
fix: don't use arrow function introduced in 2.4.1
There is ES6 syntax introduced in the latest release 2.4.1. Meanwhile the whole package is written in ES5 (`var` instead of `const`, etc). Introducing this tiny use of arrow function renders usage of this module in browsers like IE11 impossible. I hope it's not a big deal to stick with older syntax to remain consistent with code style and browser/node support
1 parent bd2795a commit 2e00b5c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎Mime.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ function Mime() {
3838
*/
3939
Mime.prototype.define = function(typeMap, force) {
4040
for (var type in typeMap) {
41-
var extensions = typeMap[type].map(t => t.toLowerCase());
41+
var extensions = typeMap[type].map(function(t) {return t.toLowerCase()});
4242
type = type.toLowerCase();
4343

4444
for (var i = 0; i < extensions.length; i++) {

0 commit comments

Comments
 (0)