Kaynağa Gözat

fix(runtime-core): fix directive inheritance on dev root fragment

fix #5523
Evan You 4 yıl önce
ebeveyn
işleme
2bab639683
1 değiştirilmiş dosya ile 2 ekleme ve 0 silme
  1. 2 0
      packages/runtime-core/src/renderer.ts

+ 2 - 0
packages/runtime-core/src/renderer.ts

@@ -1098,6 +1098,8 @@ function baseCreateRenderer(
       if (
       if (
         patchFlag > 0 &&
         patchFlag > 0 &&
         patchFlag & PatchFlags.STABLE_FRAGMENT &&
         patchFlag & PatchFlags.STABLE_FRAGMENT &&
+        // #5523 dev root fragment may inherit directives so always force update
+        !(__DEV__ && patchFlag & PatchFlags.DEV_ROOT_FRAGMENT) &&
         dynamicChildren &&
         dynamicChildren &&
         // #2715 the previous fragment could've been a BAILed one as a result
         // #2715 the previous fragment could've been a BAILed one as a result
         // of renderSlot() with no valid children
         // of renderSlot() with no valid children