Skip to content

Commit 5a74d46

Browse files
committed
Use React.Children.only for a warning
Fixes #3837
1 parent d78fa5c commit 5a74d46

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/StaticRouter.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ class StaticRouter extends React.Component {
8383
{typeof children === 'function' ? (
8484
children({ location, router: this.getChildContext().router })
8585
) : (
86-
children
86+
React.Children.only(children)
8787
)}
8888
</MatchProvider>
8989
)

0 commit comments

Comments
 (0)