Skip to content

Commit bc7e2e3

Browse files
author
Thomas Conner
committed
Only use vertxNext() when it is not undefined
1 parent 28cd7dd commit bc7e2e3

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

lib/es6-promise/asap.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,13 @@ function useNextTick() {
4545

4646
// vertx
4747
function useVertxTimer() {
48-
return function() {
49-
vertxNext(flush);
50-
};
48+
if (typeof vertxNext !== 'undefined') {
49+
return function() {
50+
vertxNext(flush);
51+
};
52+
}
53+
54+
return useSetTimeout();
5155
}
5256

5357
function useMutationObserver() {

0 commit comments

Comments
 (0)