Skip to content

Commit

Permalink
[removed] Dependency on react/lib/emptyFunction
Browse files Browse the repository at this point in the history
  • Loading branch information
mjackson committed Jul 24, 2014
1 parent 9fe8bab commit 0ac4dea
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions modules/components/Route.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
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');
Expand Down Expand Up @@ -445,7 +444,7 @@ function computeHandlerProps(matches, query) {
key: null,
params: null,
query: null,
activeRouteHandler: emptyFunction.thatReturnsNull
activeRouteHandler: returnNull
};

var childHandler;
Expand All @@ -462,7 +461,7 @@ function computeHandlerProps(matches, query) {
if (childHandler) {
props.activeRouteHandler = childHandler;
} else {
props.activeRouteHandler = emptyFunction.thatReturnsNull;
props.activeRouteHandler = returnNull;
}

childHandler = function (props, addedProps) {
Expand All @@ -476,6 +475,10 @@ function computeHandlerProps(matches, query) {
return props;
}

function returnNull() {
return null;
}

function reversedArray(array) {
return array.slice(0).reverse();
}
Expand Down

0 comments on commit 0ac4dea

Please sign in to comment.