mirror of
https://github.com/Hopiu/postal.js.git
synced 2026-03-16 22:20:23 +00:00
Updated defer to match withDelay for calling setTimeout. Fixes #28
This commit is contained in:
parent
f6729c191b
commit
dcddf5392e
3 changed files with 7 additions and 3 deletions
|
|
@ -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
2
lib/postal.min.js
vendored
File diff suppressed because one or more lines are too long
|
|
@ -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;
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in a new issue