Skip to content

Commit

Permalink
fix for undefined value situations;
Browse files Browse the repository at this point in the history
  • Loading branch information
xobotyi committed Nov 19, 2018
1 parent ef5fe82 commit cbe483f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -304,11 +304,11 @@ function (_React$Component) {
}

if (this.props.scrollTop !== prevProps.scrollTop) {
this.contentEl.scrollTop = this.props.scrollTop;
this.contentEl.scrollTop = this.props.scrollTop || 0;
}

if (this.props.scrollLeft !== prevProps.scrollLeft) {
this.contentEl.scrollLeft = this.props.scrollLeft;
this.contentEl.scrollLeft = this.props.scrollLeft || 0;
}
}
}, {
Expand Down
4 changes: 2 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -237,11 +237,11 @@ export default class Scrollbar extends React.Component {
}

if (this.props.scrollTop !== prevProps.scrollTop) {
this.contentEl.scrollTop = this.props.scrollTop;
this.contentEl.scrollTop = this.props.scrollTop || 0;
}

if (this.props.scrollLeft !== prevProps.scrollLeft) {
this.contentEl.scrollLeft = this.props.scrollLeft;
this.contentEl.scrollLeft = this.props.scrollLeft || 0;
}
}

Expand Down

0 comments on commit cbe483f

Please sign in to comment.