Skip to content

Commit bfeb2d9

Browse files
committed
refactor: restrict Teleport extraneous attribute warning to dev mode.
1 parent 624cb19 commit bfeb2d9

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

packages/runtime-vapor/src/components/Teleport.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,12 @@ export class TeleportFragment extends VaporFragment<Block[]> {
151151
// preventing attrs fallthrough
152152
// consistent with VDOM Teleport behavior
153153
const instance = this.parentComponent as VaporComponentInstance
154-
if (instance.hasFallthrough && Object.keys(instance.attrs).length) {
154+
// TODO: check if component root
155+
if (
156+
__DEV__ &&
157+
instance.hasFallthrough &&
158+
Object.keys(instance.attrs).length
159+
) {
155160
warnExtraneousAttributes(instance.attrs)
156161
}
157162

0 commit comments

Comments
 (0)