Skip to content

Commit 21e0c84

Browse files
committed
fix passed incorrect prop to anchor tag
1 parent 941c7c9 commit 21e0c84

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-scrollchor",
3-
"version": "2.1.2",
3+
"version": "2.1.3",
44
"description": "A React component for scroll to #hash links with smooth animations",
55
"files": [
66
"lib"

src/scrollchor.jsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ export default class Scrollchor extends React.Component {
2020
}
2121

2222
render() {
23-
return <a {...this.props} href={'#' + this._to} onClick={this.handleClick} />;
23+
const { to, animate, ...props } = this.props; // eslint-disable-line no-unused-vars
24+
return <a {...props} href={'#' + this._to} onClick={this.handleClick} />;
2425
}
2526
}

0 commit comments

Comments
 (0)