From 4e0956f3e3da7f55af189e75bc199e6bcaf8fc2c Mon Sep 17 00:00:00 2001 From: afc163 Date: Tue, 5 Jul 2016 10:46:00 +0800 Subject: [PATCH] should use assign in ts --- components/affix/index.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/components/affix/index.tsx b/components/affix/index.tsx index 9c939ca56..63b5d5836 100644 --- a/components/affix/index.tsx +++ b/components/affix/index.tsx @@ -3,6 +3,7 @@ import * as ReactDOM from 'react-dom'; import addEventListener from 'rc-util/lib/Dom/addEventListener'; import classNames from 'classnames'; import warning from 'warning'; +import assign from 'object-assign'; function getScroll(w, top) { let ret = w[`page${top ? 'Y' : 'X'}Offset`]; @@ -133,7 +134,7 @@ export default class Affix extends React.Component { 'ant-affix': this.state.affixStyle, }); - const props = { ...this.props }; + const props = assign({}, this.props); delete props.offsetTop; delete props.offsetBottom;