Skip to content

Commit

Permalink
chore: coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 committed Oct 5, 2017
1 parent 6d1f4cb commit e34c6b7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/core/util/env.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,15 +103,16 @@ 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 = () => {
p.then(nextTickHandler)
}
} else {
// fallback to setTimeout
/* istanbul ignore next */
timerFunc = () => {
setTimeout(nextTickHandler, 0)
}
Expand Down

0 comments on commit e34c6b7

Please sign in to comment.