Skip to content

Commit

Permalink
[changed] use Object.assign instead of merge
Browse files Browse the repository at this point in the history
  • Loading branch information
Paolo Moretti committed Oct 31, 2014
1 parent 9804a78 commit f8cb7f9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions modules/components/DefaultRoute.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
var merge = require('react/lib/merge');
var objectAssign = require('react/lib/Object.assign');
var Route = require('./Route');

/**
Expand All @@ -9,7 +9,7 @@ var Route = require('./Route');
*/
function DefaultRoute(props) {
return Route(
merge(props, {
objectAssign({}, props, {
path: null,
isDefault: true
})
Expand Down
4 changes: 2 additions & 2 deletions modules/components/Link.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
var React = require('react');
var classSet = require('react/lib/cx');
var merge = require('react/lib/merge');
var objectAssign = require('react/lib/Object.assign');
var ActiveState = require('../mixins/ActiveState');
var Navigation = require('../mixins/Navigation');

Expand Down Expand Up @@ -93,7 +93,7 @@ var Link = React.createClass({
},

render: function () {
var props = merge(this.props, {
var props = objectAssign({}, this.props, {
href: this.getHref(),
className: this.getClassName(),
onClick: this.handleClick
Expand Down
4 changes: 2 additions & 2 deletions modules/components/NotFoundRoute.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
var merge = require('react/lib/merge');
var objectAssign = require('react/lib/Object.assign');
var Route = require('./Route');

/**
Expand All @@ -10,7 +10,7 @@ var Route = require('./Route');
*/
function NotFoundRoute(props) {
return Route(
merge(props, {
objectAssign({}, props, {
path: null,
catchAll: true
})
Expand Down

0 comments on commit f8cb7f9

Please sign in to comment.