From f8cb7f9bd3d1ffa218ef56962872b4356d651168 Mon Sep 17 00:00:00 2001 From: Paolo Moretti Date: Fri, 31 Oct 2014 15:55:30 +0000 Subject: [PATCH] [changed] use `Object.assign` instead of `merge` --- modules/components/DefaultRoute.js | 4 ++-- modules/components/Link.js | 4 ++-- modules/components/NotFoundRoute.js | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/modules/components/DefaultRoute.js b/modules/components/DefaultRoute.js index 33cbf211a2..61dbc2e9df 100644 --- a/modules/components/DefaultRoute.js +++ b/modules/components/DefaultRoute.js @@ -1,4 +1,4 @@ -var merge = require('react/lib/merge'); +var objectAssign = require('react/lib/Object.assign'); var Route = require('./Route'); /** @@ -9,7 +9,7 @@ var Route = require('./Route'); */ function DefaultRoute(props) { return Route( - merge(props, { + objectAssign({}, props, { path: null, isDefault: true }) diff --git a/modules/components/Link.js b/modules/components/Link.js index 9ca402d39f..8360314ded 100644 --- a/modules/components/Link.js +++ b/modules/components/Link.js @@ -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'); @@ -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 diff --git a/modules/components/NotFoundRoute.js b/modules/components/NotFoundRoute.js index 24ed0a5299..5fe83ac922 100644 --- a/modules/components/NotFoundRoute.js +++ b/modules/components/NotFoundRoute.js @@ -1,4 +1,4 @@ -var merge = require('react/lib/merge'); +var objectAssign = require('react/lib/Object.assign'); var Route = require('./Route'); /** @@ -10,7 +10,7 @@ var Route = require('./Route'); */ function NotFoundRoute(props) { return Route( - merge(props, { + objectAssign({}, props, { path: null, catchAll: true })