Skip to content

Commit

Permalink
Use copyProperties instead of mergeProperties
Browse files Browse the repository at this point in the history
  • Loading branch information
mjackson committed Aug 14, 2014
1 parent 61643ea commit 9a50faf
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 15 deletions.
6 changes: 3 additions & 3 deletions modules/components/Routes.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
var React = require('react');
var warning = require('react/lib/warning');
var copyProperties = require('react/lib/copyProperties');
var Promise = require('es6-promise').Promise;
var goBack = require('../helpers/goBack');
var mergeProperties = require('../helpers/mergeProperties');
var replaceWith = require('../helpers/replaceWith');
var transitionTo = require('../helpers/transitionTo');
var Route = require('../components/Route');
Expand Down Expand Up @@ -216,7 +216,7 @@ function Transition(path) {
this.isCancelled = false;
}

mergeProperties(Transition.prototype, {
copyProperties(Transition.prototype, {

abort: function () {
this.cancelReason = new Abort();
Expand Down Expand Up @@ -450,7 +450,7 @@ function computeHandlerProps(matches, query) {
if (arguments.length > 2 && typeof arguments[2] !== 'undefined')
throw new Error('Passing children to a route handler is not supported');

return route.props.handler(mergeProperties(props, addedProps));
return route.props.handler(copyProperties(props, addedProps));
}.bind(this, props);
});

Expand Down
4 changes: 2 additions & 2 deletions modules/helpers/Path.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
var invariant = require('react/lib/invariant');
var copyProperties = require('react/lib/copyProperties');
var qs = require('querystring');
var mergeProperties = require('./mergeProperties');
var URL = require('./URL');

var paramMatcher = /((?::[a-z_$][a-z0-9_$]*)|\*)/ig;
Expand Down Expand Up @@ -125,7 +125,7 @@ var Path = {
var existingQuery = Path.extractQuery(path);

if (existingQuery)
query = query ? mergeProperties(existingQuery, query) : existingQuery;
query = query ? copyProperties(existingQuery, query) : existingQuery;

var queryString = query && qs.stringify(query);

Expand Down
10 changes: 0 additions & 10 deletions modules/helpers/mergeProperties.js

This file was deleted.

0 comments on commit 9a50faf

Please sign in to comment.