diff --git a/packages/runtime-core/__tests__/rendererPortal.spec.ts b/packages/runtime-core/__tests__/rendererPortal.spec.ts index b6fb23b0..c8f82a52 100644 --- a/packages/runtime-core/__tests__/rendererPortal.spec.ts +++ b/packages/runtime-core/__tests__/rendererPortal.spec.ts @@ -39,7 +39,7 @@ describe('renderer: portal', () => { const Comp = createComponent(() => () => h(Fragment, [ - h(Portal, { target }, h('div', 'teleported')), + h(Portal, { target: target.value }, h('div', 'teleported')), h('div', 'root') ]) ) diff --git a/packages/runtime-core/src/renderer.ts b/packages/runtime-core/src/renderer.ts index a6999e43..4185b7d4 100644 --- a/packages/runtime-core/src/renderer.ts +++ b/packages/runtime-core/src/renderer.ts @@ -680,11 +680,7 @@ export function createRenderer< isSVG: boolean, optimized: boolean ) { - let targetSelector = n2.props && n2.props.target - if (isRef(targetSelector)) { - targetSelector = targetSelector.value - } - + const targetSelector = n2.props && n2.props.target const { patchFlag, shapeFlag, children } = n2 if (n1 == null) { const target = (n2.target = isString(targetSelector)