Merge pull request #29 from dcneiner/settimeout-data

Updated defer to match withDelay for calling setTimeout. Fixes #28
This commit is contained in:
Jim Cowart 2013-03-18 08:34:45 -07:00
commit 25d4550e57
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;
},