Skip to content

Commit

Permalink
Refactor: Rename vars in renderDOM
Browse files Browse the repository at this point in the history
  • Loading branch information
overlookmotel committed Jan 22, 2019
1 parent 9c0361e commit 9e40c75
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -194,15 +194,15 @@ class PartialRenderer extends ReactDOMServerRenderer {
// Remove tag
html = html.replace(
/^(<.+?) data-reactroot=""(\/?>)/,
(whole, before, after) => `${before}${after}`
(whole, start, end) => `${start}${end}`
);
}
} else {
if (this.isRootElement && this.stack.length === this.boundaryDepth + 2) {
// Add tag
html = html.replace(
/^(<.+?)(\/?>)/,
(whole, before, after) => `${before} data-reactroot=""${after}`
(whole, start, end) => `${start} data-reactroot=""${end}`
);
}
}
Expand Down

0 comments on commit 9e40c75

Please sign in to comment.