Properly handle and trigger events
This commit is contained in:
@@ -364,7 +364,7 @@
|
||||
|
||||
if(!on_complete && typeOf(args) == 'function'){
|
||||
on_complete = args;
|
||||
args = {};
|
||||
args = [];
|
||||
}
|
||||
|
||||
// Create parallel callback
|
||||
@@ -372,7 +372,7 @@
|
||||
self.global_events[name].each(function(handle, nr){
|
||||
|
||||
callbacks.push(function(callback){
|
||||
var results = handle(args || {});
|
||||
var results = handle.apply(handle, args || []);
|
||||
callback(null, results || null);
|
||||
});
|
||||
|
||||
@@ -593,4 +593,4 @@ var createSpinner = function(target, options){
|
||||
}, options);
|
||||
|
||||
return new Spinner(opts).spin(target);
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user