|
|
@@ -27,8 +27,9 @@ export function createFnInvoker (fns: Function | Array<Function>): Function {
|
|
|
function invoker () {
|
|
|
const fns = invoker.fns
|
|
|
if (Array.isArray(fns)) {
|
|
|
- for (let i = 0; i < fns.length; i++) {
|
|
|
- fns[i].apply(null, arguments)
|
|
|
+ const cloned = fns.slice()
|
|
|
+ for (let i = 0; i < cloned.length; i++) {
|
|
|
+ cloned[i].apply(null, arguments)
|
|
|
}
|
|
|
} else {
|
|
|
// return handler return value for single handlers
|