Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
* fix ant-design#2604

* fix
  • Loading branch information
ddcat1115 authored and afc163 committed Aug 6, 2016
1 parent 0ad3492 commit 2a9864c
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions components/back-top/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,6 @@ export default class BackTop extends React.Component {
</div>
);

const style = {
display: this.state.visible ? 'block' : 'none',
};

// fix https://fb.me/react-unknown-prop
const divProps = omit(otherProps, [
'visibilityHeight',
Expand All @@ -94,10 +90,8 @@ export default class BackTop extends React.Component {
<Animate component="" transitionName="fade">
{
this.state.visible ?
<div data-show={this.state.visible} style={style}>
<div {...divProps} className={classString} onClick={this.scrollToTop}>
{children || defaultElement}
</div>
<div {...divProps} className={classString} onClick={this.scrollToTop}>
{children || defaultElement}
</div>
: null
}
Expand Down

0 comments on commit 2a9864c

Please sign in to comment.