diff --git a/examples/master-detail/app.js b/examples/master-detail/app.js
index 9cc7f2fa41..d87c46f850 100644
--- a/examples/master-detail/app.js
+++ b/examples/master-detail/app.js
@@ -111,7 +111,6 @@ var App = React.createClass({
var contacts = this.state.contacts.map(function(contact) {
return
{contact.first}
});
- var content = (this.props.activeRoute) ? this.props.activeRoute() : this.indexTemplate();
return (
@@ -121,7 +120,7 @@ var App = React.createClass({
- {content}
+ {this.props.activeRoute() || this.indexTemplate()}
);
diff --git a/modules/components/Route.js b/modules/components/Route.js
index ba17868a2d..56aa6ecf75 100644
--- a/modules/components/Route.js
+++ b/modules/components/Route.js
@@ -1,6 +1,7 @@
var React = require('react');
var warning = require('react/lib/warning');
var invariant = require('react/lib/invariant');
+var emptyFunction = require('react/lib/emptyFunction');
var ExecutionEnvironment = require('react/lib/ExecutionEnvironment');
var mergeProperties = require('../helpers/mergeProperties');
var goBack = require('../helpers/goBack');
@@ -426,7 +427,7 @@ function computeHandlerProps(matches, query) {
key: null,
params: null,
query: null,
- activeRoute: null
+ activeRoute: emptyFunction.thatReturnsNull
};
var childHandler;
@@ -443,7 +444,7 @@ function computeHandlerProps(matches, query) {
if (childHandler) {
props.activeRoute = childHandler;
} else {
- props.activeRoute = null;
+ props.activeRoute = emptyFunction.thatReturnsNull;
}
childHandler = function (props, addedProps, children) {