提交 7f28629a 编写于 作者: aaronchen2k2k's avatar aaronchen2k2k

fix code review issues

上级 f716d97c
...@@ -83,10 +83,10 @@ export default function mitt(all?: EventHandlerMap): Emitter { ...@@ -83,10 +83,10 @@ export default function mitt(all?: EventHandlerMap): Emitter {
* @memberOf mitt * @memberOf mitt
*/ */
emit<T = any>(type: EventType, evt: T) { emit<T = any>(type: EventType, evt: T) {
((all?.get(type) || []) as EventHandlerList).slice().map((handler) => { ((all?.get(type) || []) as EventHandlerList).slice().forEach((handler) => {
handler(evt); handler(evt);
}); });
((all?.get('*') || []) as WildCardEventHandlerList).slice().map((handler) => { ((all?.get('*') || []) as WildCardEventHandlerList).slice().forEach((handler) => {
handler(type, evt); handler(type, evt);
}); });
}, },
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册