Skip to content

Commit e1626b3

Browse files
committed
fix: apply fragment fallthrough attributes reactively using renderEffect.
1 parent 36b47d1 commit e1626b3

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

packages/runtime-vapor/src/component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,7 @@ export function setupComponent(
405405
) {
406406
const root = getRootElement(
407407
instance.block,
408-
// attach attrs to dynamic fragments for applying during each update
408+
// attach attrs to root dynamic fragments for applying during each update
409409
frag => (frag.attrs = instance.attrs),
410410
false,
411411
)

packages/runtime-vapor/src/fragment.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ import {
3333
} from './dom/hydration'
3434
import { getParentInstance } from './componentSlots'
3535
import { isArray } from '@vue/shared'
36+
import { renderEffect } from './renderEffect'
3637

3738
export class VaporFragment<T extends Block = Block>
3839
implements TransitionOptions
@@ -209,7 +210,9 @@ export class DynamicFragment extends VaporFragment {
209210
// fallthrough attrs
210211
if (this.attrs) {
211212
if (this.nodes instanceof Element) {
212-
applyFallthroughProps(this.nodes, this.attrs)
213+
renderEffect(() =>
214+
applyFallthroughProps(this.nodes as Element, this.attrs!),
215+
)
213216
} else if (
214217
__DEV__ &&
215218
// preventing attrs fallthrough on slots

0 commit comments

Comments
 (0)