From c765765e98e2c085ccb90b5a75f68c7bc983c351 Mon Sep 17 00:00:00 2001 From: Evan You Date: Thu, 30 May 2024 10:49:10 +0800 Subject: [PATCH] chore: tweak --- packages/runtime-core/src/components/Teleport.ts | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/packages/runtime-core/src/components/Teleport.ts b/packages/runtime-core/src/components/Teleport.ts index d2b65058a5c..8d174e2022c 100644 --- a/packages/runtime-core/src/components/Teleport.ts +++ b/packages/runtime-core/src/components/Teleport.ts @@ -47,14 +47,13 @@ const resolveTarget = ( 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 }