Skip to content

Commit 528b90d

Browse files
committed
Skip children, key and ref attributes
1 parent 083124d commit 528b90d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,8 @@ export default function renderToString(vnode, context, opts, inner) {
133133
for (let i=0; i<attrs.length; i++) {
134134
let name = attrs[i],
135135
v = attributes[name];
136+
if (name==='children') continue;
137+
if (!(opts && opts.allAttributes) && (name==='key' || name==='ref')) continue;
136138
if (name==='className') {
137139
if (attributes['class']) continue;
138140
name = 'class';

0 commit comments

Comments
 (0)