Skip to content

Commit c298156

Browse files
committed
fix: prevent extraneous attributes warning for empty component blocks.
1 parent 9d25c35 commit c298156

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/runtime-vapor/src/component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ export function setupComponent(
410410
const root = filterSingleRootElement(instance.block)
411411
if (root) {
412412
renderEffect(() => applyFallthroughProps(root, instance.attrs))
413-
} else if (__DEV__ && isArray(instance.block)) {
413+
} else if (__DEV__ && isArray(instance.block) && instance.block.length) {
414414
warnExtraneousAttributes(instance.attrs)
415415
}
416416
}

0 commit comments

Comments
 (0)