Skip to content

Commit

Permalink
chore: tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 committed May 30, 2024
1 parent 2853d19 commit c765765
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions packages/runtime-core/src/components/Teleport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,13 @@ const resolveTarget = <T = RendererElement>(
return null
} else {
const target = select(targetSelector)
if (!target && !isTeleportDisabled(props)) {
__DEV__ &&
warn(
`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.`,
)
if (__DEV__ && !target && !isTeleportDisabled(props)) {
warn(
`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 T
}
Expand Down

0 comments on commit c765765

Please sign in to comment.