Skip to content

Commit a0110de

Browse files
committed
Minor fix
1 parent 9e3e759 commit a0110de

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

browser.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,15 @@ function defaultClearTimeout () {
1818
}
1919
function detectQueueMicrotask () {
2020
try {
21-
if (cachedQueueMicrotask !== queueMicrotask) {
21+
if (!cachedQueueMicrotask && cachedQueueMicrotask !== queueMicrotask) {
2222
cachedQueueMicrotask = queueMicrotask;
23+
return true;
2324
}
2425

2526
return cachedQueueMicrotask !== undefined;
26-
} catch (e) {}
27+
} catch (e) {
28+
return false;
29+
}
2730
}
2831
(function () {
2932
try {
@@ -142,8 +145,6 @@ function drainQueue() {
142145
runClearTimeout(timeout);
143146
}
144147

145-
;
146-
147148
process.nextTick = function (fun) {
148149
var args = new Array(arguments.length - 1);
149150
if (arguments.length > 1) {

0 commit comments

Comments
 (0)