Skip to content

Commit

Permalink
fix(runtime-core): skip patchBlockChildren if n1.dynamicChildren is n…
Browse files Browse the repository at this point in the history
…ull (#2717)

fix #2715 

The bug was introduced by #2485 where a compiled slot may result in a bailed Fragment
which then gets its dynamicChildren set to `null` by the renderer.
  • Loading branch information
edison1105 authored Dec 3, 2020
1 parent a835250 commit c59897c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions packages/runtime-core/src/renderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1139,12 +1139,15 @@ function baseCreateRenderer(
if (
patchFlag > 0 &&
patchFlag & PatchFlags.STABLE_FRAGMENT &&
dynamicChildren
dynamicChildren &&
// #2715 the previous fragment could've been a BAILed one as a result
// of renderSlot() with no valid children
n1.dynamicChildren
) {
// a stable fragment (template root or <template v-for>) doesn't need to
// patch children order, but it may contain dynamicChildren.
patchBlockChildren(
n1.dynamicChildren!,
n1.dynamicChildren,
dynamicChildren,
container,
parentComponent,
Expand Down

13 comments on commit c59897c

@sionzee
Copy link

@sionzee sionzee commented on c59897c Dec 4, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be released as soon as possible. Breaking all production builds.

@TothingWay
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please released as soon as possible.

@samchenws
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

请尽快发布。

@TothingWay
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@samchenws 我已经等了20天了,还没有发版

@samchenws
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

严重影响了升级进度,哎

@ht-sauce
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

vue3.0.0有很多问题,3.0.4又有这种致命bug。难啊,请尽快发布

@ChainsDW
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

感觉这个问题很大呀,更新个版本先用一用啊

@physihan
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

小白鼠真难,下次再有机会不去尝鲜了

@samchenws
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这BUG不知道什么时候才会更新

@Vgbire
Copy link

@Vgbire Vgbire commented on c59897c Dec 29, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

快更新这个BUG啊,其他可以延缓一下发布。。。

@TothingWay
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please released as soon as possible.

@2nthony
Copy link

@2nthony 2nthony commented on c59897c Dec 29, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you facing this error in the case with loop render slot,
try to set a non-empty array to prevent this error for now.

const items = ref([{ name: 'Metroid' }])
promise.then(res => items.value = res)

@EstebanFuentealba
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please 🙏

Please sign in to comment.