Skip to content

Commit

Permalink
[changed] Render empty div before transition hooks
Browse files Browse the repository at this point in the history
Fixes #77
  • Loading branch information
mjackson committed Jul 9, 2014
1 parent 6fc35d1 commit a3d6e2a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions modules/components/Route.js
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,11 @@ var Route = React.createClass({
},

render: function () {
// TODO: In React 0.11 we will be able to `return null` here.
// https://github.com/facebook/react/issues/1058
if (!this.state.path)
return React.DOM.div();

return this.props.handler(computeHandlerProps(this.state.matches || [], this.state.activeQuery));
}

Expand Down

1 comment on commit a3d6e2a

@bobeagan
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be able to remove this TODO and update the return value now that 0.11 has dropped.

Please sign in to comment.