should use assign in ts

This commit is contained in:
afc163
2016-07-05 10:46:00 +08:00
parent d280cba481
commit 4e0956f3e3
+2 -1
View File
@@ -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<AffixProps, any> {
'ant-affix': this.state.affixStyle,
});
const props = { ...this.props };
const props = assign({}, this.props);
delete props.offsetTop;
delete props.offsetBottom;