Skip to content

Commit 84b7b82

Browse files
committed
fix SSR tests
1 parent b3ebfef commit 84b7b82

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/platforms/web/server/modules/dom-props.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,17 @@ export default function renderDOMProps (node: VNodeWithData): string {
2020
return res
2121
}
2222

23+
const attrs = node.data.attrs
2324
for (const key in props) {
2425
if (key === 'innerHTML') {
2526
setText(node, props[key], true)
2627
} else if (key === 'textContent') {
2728
setText(node, props[key])
2829
} else {
2930
const attr = propsToAttrMap[key] || key.toLowerCase()
30-
if (isRenderableAttr(attr)) {
31+
if (isRenderableAttr(attr) &&
32+
// avoid rendering double-bound props/attrs twice
33+
!(attrs && attrs[attr])) {
3134
res += renderAttr(attr, props[key])
3235
}
3336
}

src/platforms/web/server/util.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const isAttr = makeMap(
88
'checked,cite,class,code,codebase,color,cols,colspan,content,http-equiv,' +
99
'name,contenteditable,contextmenu,controls,coords,data,datetime,default,' +
1010
'defer,dir,dirname,disabled,download,draggable,dropzone,enctype,method,for,' +
11-
'form,formaction,headers,<th>,height,hidden,high,href,hreflang,http-equiv,' +
11+
'form,formaction,headers,height,hidden,high,href,hreflang,http-equiv,' +
1212
'icon,id,ismap,itemprop,keytype,kind,label,lang,language,list,loop,low,' +
1313
'manifest,max,maxlength,media,method,GET,POST,min,multiple,email,file,' +
1414
'muted,name,novalidate,open,optimum,pattern,ping,placeholder,poster,' +

0 commit comments

Comments
 (0)