Skip to content

Commit

Permalink
Sophisticate the fastTimeout conditional export (close #2)
Browse files Browse the repository at this point in the history
  • Loading branch information
jgonggrijp committed Dec 10, 2024
1 parent 0e644eb commit cf246b4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/fastTimeout.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,6 @@ function enable() {
}

var hasSetImmediate = (typeof setImmediate === 'function');
var hasPostMessage = (typeof self.postMessage === 'function');

export default hasSetImmediate ? setImmediate : enable();
export default hasPostMessage ? enable() : hasSetImmediate ? setImmediate : _.defer;

0 comments on commit cf246b4

Please sign in to comment.