Skip to content

Commit

Permalink
fix: do not use MutationObserver in IE11
Browse files Browse the repository at this point in the history
MutationObserver is unreliable in IE11. fix vuejs#6466
  • Loading branch information
yyx990803 authored and hefeng committed Jan 25, 2019
1 parent d4c8d98 commit 9890439
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/util/env.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,13 +99,13 @@ export const nextTick = (function () {
// "force" the microtask queue to be flushed by adding an empty timer.
if (isIOS) setTimeout(noop)
}
} else if (typeof MutationObserver !== 'undefined' && (
} else if (!isIE && typeof MutationObserver !== 'undefined' && (
isNative(MutationObserver) ||
// PhantomJS and iOS 7.x
MutationObserver.toString() === '[object MutationObserverConstructor]'
)) {
// use MutationObserver where native Promise is not available,
// e.g. PhantomJS IE11, iOS7, Android 4.4
// e.g. PhantomJS, iOS7, Android 4.4
var counter = 1
var observer = new MutationObserver(nextTickHandler)
var textNode = document.createTextNode(String(counter))
Expand Down

0 comments on commit 9890439

Please sign in to comment.