Skip to content

Commit 5363bf0

Browse files
committed
Let's keep all as an argument for now to avoid a semver breaking change
1 parent 4540116 commit 5363bf0

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/index.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,10 @@
22
* @name mitt
33
* @returns {Mitt}
44
*/
5-
export default function mitt () {
6-
let all = Object.create(null)
7-
let ret = {
8-
all,
5+
export default function mitt(all) {
6+
all = all || Object.create(null);
97

8+
return {
109
/**
1110
* Register an event handler for the given type.
1211
*
@@ -49,5 +48,4 @@ export default function mitt () {
4948
return ret;
5049
}
5150
};
52-
return ret;
5351
}

0 commit comments

Comments
 (0)