fix(sfc): inherit parent scopeId on child rooot (#756)

This commit is contained in:
hareku
2020-02-21 22:44:13 +09:00
committed by GitHub
parent 1b9b235663
commit 9547c2b93d
5 changed files with 41 additions and 3 deletions

View File

@@ -53,7 +53,9 @@ export function ssrRenderDynamicAttr(
if (isBooleanAttr(attrKey)) {
return value === false ? `` : ` ${attrKey}`
} else if (isSSRSafeAttrName(attrKey)) {
return ` ${attrKey}="${escapeHtml(value)}"`
return value === ''
? ` ${attrKey}`
: ` ${attrKey}="${escapeHtml(value)}"`
} else {
console.warn(
`[@vue/server-renderer] Skipped rendering unsafe attribute name: ${attrKey}`