Skip to content

Commit

Permalink
chore: more detailed teleport target warning
Browse files Browse the repository at this point in the history
close #1629
  • Loading branch information
yyx990803 committed Jul 19, 2020
1 parent f9826fa commit b3af5db
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/runtime-core/src/components/Teleport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,10 @@ const resolveTarget = <T = RendererElement>(
if (!target) {
__DEV__ &&
warn(
`Failed to locate Teleport target with selector "${targetSelector}".`
`Failed to locate Teleport target with selector "${targetSelector}". ` +
`Note the target element must exist before the component is mounted - ` +
`i.e. the target cannot be rendered by the component itself, and ` +
`ideally should be outside of the entire Vue component tree.`
)
}
return target as any
Expand Down

0 comments on commit b3af5db

Please sign in to comment.