fix nextTick
This commit is contained in:
parent
351aca3243
commit
6d37d19cd8
@ -90,14 +90,7 @@ export function nextTick(fn, context = null) {
|
|||||||
const out = fn.apply(context, args);
|
const out = fn.apply(context, args);
|
||||||
resolve(out);
|
resolve(out);
|
||||||
};
|
};
|
||||||
|
setTimeout(execute);
|
||||||
if (window.setImmediate) {
|
|
||||||
setImmediate(execute);
|
|
||||||
} else if (window.requestAnimationFrame) {
|
|
||||||
requestAnimationFrame(execute);
|
|
||||||
} else {
|
|
||||||
setTimeout(execute);
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user