Skip to content

Commit 5438bc0

Browse files
committed
Do not cache props.children
1 parent 7134733 commit 5438bc0

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

index.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,8 @@ function createRouter(component) {
3737
var match, page, notFound;
3838
var len, i;
3939

40-
this.children = this.children || this.props.children;
41-
42-
for (i = 0, len = this.children.length; i < len; i++) {
43-
var current = this.children[i];
40+
for (i = 0, len = this.props.children.length; i < len; i++) {
41+
var current = this.props.children[i];
4442

4543
if (process.env.NODE_ENV !== "production") {
4644
invariant(

0 commit comments

Comments
 (0)