Updated defer to match withDelay for calling setTimeout. Fixes #28

This commit is contained in:
Doug Neiner 2013-03-17 20:24:39 -05:00
parent f6729c191b
commit dcddf5392e
3 changed files with 7 additions and 3 deletions

View file

@ -108,7 +108,9 @@
defer : function () {
var fn = this.callback;
this.callback = function ( data ) {
setTimeout( fn, 0, data );
setTimeout( function () {
fn( data );
}, 0 );
};
return this;
},

2
lib/postal.min.js vendored

File diff suppressed because one or more lines are too long

View file

@ -33,7 +33,9 @@ SubscriptionDefinition.prototype = {
defer : function () {
var fn = this.callback;
this.callback = function ( data ) {
setTimeout( fn, 0, data );
setTimeout( function () {
fn( data );
}, 0 );
};
return this;
},