mirror of
https://github.com/vuejs/vue.git
synced 2024-11-22 04:39:46 +00:00
fix multiple events
This commit is contained in:
parent
8cf836f2ec
commit
93978f8469
@ -1,9 +1,8 @@
|
||||
function arrInvoker (arr) {
|
||||
return function () {
|
||||
// Special case when length is two, for performance
|
||||
arr.length === 2
|
||||
? arr[0](arr[1])
|
||||
: arr[0].apply(undefined, arr.slice(1))
|
||||
return function (ev) {
|
||||
for (let i = 0; i < arr.length; i++) {
|
||||
arr[i](ev)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user