fix(ssr): don't warn for missing teleport target if disabled (#5135)

This commit is contained in:
Kael 2022-05-11 11:33:08 +10:00 committed by GitHub
parent cd659fc86f
commit da10dd7de9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -353,7 +353,9 @@ function renderTeleportVNode(
const target = vnode.props && vnode.props.to const target = vnode.props && vnode.props.to
const disabled = vnode.props && vnode.props.disabled const disabled = vnode.props && vnode.props.disabled
if (!target) { if (!target) {
if (!disabled) {
warn(`[@vue/server-renderer] Teleport is missing target prop.`) warn(`[@vue/server-renderer] Teleport is missing target prop.`)
}
return [] return []
} }
if (!isString(target)) { if (!isString(target)) {