fix(Portal): add ability to use element as target (#380)

This commit is contained in:
Dmitry Sharshakov 2019-10-26 17:32:16 +03:00 committed by Evan You
parent b788c03992
commit 49914efc9e

View File

@ -657,7 +657,7 @@ export function createRenderer<
if (n1 == null) {
const target = (n2.target = isString(targetSelector)
? hostQuerySelector(targetSelector)
: null)
: targetSelector)
if (target != null) {
if (shapeFlag & ShapeFlags.TEXT_CHILDREN) {
hostSetElementText(target, children as string)