Skip to content

Commit

Permalink
Changed var name to fix tslint-error "Shadowed name: 'children'"
Browse files Browse the repository at this point in the history
  • Loading branch information
jhsware committed Jan 28, 2020
1 parent bcc0b87 commit 23979bb
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions packages/inferno-server/src/renderToString.queuestream.ts
Original file line number Diff line number Diff line change
Expand Up @@ -284,20 +284,18 @@ export class RenderQueueStream extends Readable {
this.addToQueue(children === '' ? ' ' : escapeText(children), position);
// Handle fragments and arrays
} else if (isArray(vNode) || (flags & VNodeFlags.Fragment) !== 0) {

const childFlags = vNode.childFlags;

if (childFlags === ChildFlags.HasVNodeChildren || (isArray(vNode) && vNode.length === 0)) {
this.addToQueue ('<!--!-->', position);
} else if (childFlags & ChildFlags.MultipleChildren || isArray(vNode)) {
const children = isArray(vNode) ? vNode : vNode.children;
const tmpChildren = isArray(vNode) ? vNode : vNode.children;

for (let i = 0, len = children.length; i < len; ++i) {
this.renderVNodeToQueue(children[i], context, position);
for (let i = 0, len = tmpChildren.length; i < len; ++i) {
this.renderVNodeToQueue(tmpChildren[i], context, position);
}
return;
}

// Handle errors
} else {
if (process.env.NODE_ENV !== 'production') {
Expand Down

0 comments on commit 23979bb

Please sign in to comment.