Skip to content

Commit

Permalink
Merge pull request #5 from pixcai/master
Browse files Browse the repository at this point in the history
修复异步fire问题
  • Loading branch information
hustcc authored Aug 22, 2016
2 parents cb6ddd1 + f767653 commit 6bc2df9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/onfire.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,10 @@
**/
function fire(eventName) {
// fire events
setTimeout(_fire_func(eventName, slice(arguments, 1)), 0);
var args = slice(arguments, 1);
setTimeout(function () {
_fire_func(eventName, args);
});
}
/**
* onfire.fireSync( event[, data1 [,data2] ... ] )
Expand Down

0 comments on commit 6bc2df9

Please sign in to comment.