We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
.off()
.emit()
1 parent b7276db commit f38922aCopy full SHA for f38922a
src/index.js
@@ -54,8 +54,8 @@ export default function mitt(all: EventHandlerMap) {
54
* @memberOf mitt
55
*/
56
emit(type: string, evt: any) {
57
- (all[type] || []).map((handler) => { handler(evt); });
58
- (all['*'] || []).map((handler) => { handler(type, evt); });
+ (all[type] || []).slice().map((handler) => { handler(evt); });
+ (all['*'] || []).slice().map((handler) => { handler(type, evt); });
59
}
60
};
61
0 commit comments