Skip to content

Commit

Permalink
🐛fix bug when the param is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
宋慧武 committed Apr 13, 2019
1 parent 6ce7729 commit f1404ef
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/hooks/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* @Author: 宋慧武
* @Date: 2019-03-06 17:49:29
* @Last Modified by: 宋慧武
* @Last Modified time: 2019-04-08 15:59:04
* @Last Modified time: 2019-04-13 22:54:49
*/
import {
isProd,
Expand Down Expand Up @@ -186,7 +186,7 @@ export function bind(
}
if (el[`$on_${eventName}`]) break;
componentInstance.$on(eventName, (...args) => {
this.target = (args[0].e || args[0].event).target;
this.target = el;
tck = events[id].bind(null, context, args[0]);
queue = [tck, fn.bind(null, ...args)];
modifiers.delay && queue.reverse();
Expand All @@ -198,7 +198,7 @@ export function bind(
}
case "function":
componentInstance.$on(eventName, data => {
const args = Object.values(data);
const args = Object.values(data || {});

tck = events[id].bind(null, context, data);
queue = [tck, value.bind(null, ...args)];
Expand Down

0 comments on commit f1404ef

Please sign in to comment.