Skip to content

Commit

Permalink
fix(ssr): don't warn for missing teleport target if disabled (#5135)
Browse files Browse the repository at this point in the history
  • Loading branch information
KaelWD committed May 11, 2022
1 parent cd659fc commit da10dd7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/server-renderer/src/render.ts
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,9 @@ function renderTeleportVNode(
const target = vnode.props && vnode.props.to
const disabled = vnode.props && vnode.props.disabled
if (!target) {
warn(`[@vue/server-renderer] Teleport is missing target prop.`)
if (!disabled) {
warn(`[@vue/server-renderer] Teleport is missing target prop.`)
}
return []
}
if (!isString(target)) {
Expand Down

0 comments on commit da10dd7

Please sign in to comment.