Просмотр исходного кода

fix: replace hardcoded .parentNode with abstract ops, fix #8713 (#8714)

GU Yiling 7 лет назад
Родитель
Сommit
1e1ce0cac7
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      src/core/vdom/patch.js

+ 1 - 1
src/core/vdom/patch.js

@@ -272,7 +272,7 @@ export function createPatchFunction (backend) {
   function insert (parent, elm, ref) {
   function insert (parent, elm, ref) {
     if (isDef(parent)) {
     if (isDef(parent)) {
       if (isDef(ref)) {
       if (isDef(ref)) {
-        if (ref.parentNode === parent) {
+        if (nodeOps.parentNode(ref) === parent) {
           nodeOps.insertBefore(parent, elm, ref)
           nodeOps.insertBefore(parent, elm, ref)
         }
         }
       } else {
       } else {