Skip to content

Commit

Permalink
Merge pull request #547 from redwoodjs/pp-fix-private-router-bug
Browse files Browse the repository at this point in the history
Convert children into array to do array things.
  • Loading branch information
peterp committed May 15, 2020
2 parents cf55182 + 75e8fdb commit ed98cfb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/router/src/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ const RouterImpl = ({
// Find `Private` components, mark their children `Route` components as private,
// and merge them into a single array.
const privateRoutes =
children
React.Children.toArray(children)
.filter((child) => child.type === Private)
.map((privateElement) => {
// Set `Route` props
Expand Down

0 comments on commit ed98cfb

Please sign in to comment.