diff --git a/src/core/util/env.js b/src/core/util/env.js index fa7e41c57d2..ca14c30264a 100644 --- a/src/core/util/env.js +++ b/src/core/util/env.js @@ -103,7 +103,9 @@ export const nextTick = (function () { timerFunc = () => { port.postMessage(1) } - } else if (typeof Promise !== 'undefined' && isNative(Promise)) { + } else + /* istanbul ignore next */ + if (typeof Promise !== 'undefined' && isNative(Promise)) { // use microtask in non-DOM environments, e.g. Weex const p = Promise.resolve() timerFunc = () => { @@ -111,7 +113,6 @@ export const nextTick = (function () { } } else { // fallback to setTimeout - /* istanbul ignore next */ timerFunc = () => { setTimeout(nextTickHandler, 0) }