Skip to content

Commit

Permalink
Fix React 16 warning about javascript in href (#32)
Browse files Browse the repository at this point in the history
Fixes #31
  • Loading branch information
iceberk authored Apr 11, 2020
1 parent 7c21f74 commit ce4cddb
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions libs/js/Editable.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -269,8 +269,7 @@ export default class Editable extends Component {
{!(mode == 'inline' && editable) ? (
<a
ref={ref => (this.editableAnchor = ref)}
onClick={this.setEditable.bind(this, true)}
href="javascript:;"
onClick={(e) => {e.preventDefault(); this.setEditable(true)}}
>
{this.getValueForAnchor() || this.props.emptyValueText}
</a>
Expand Down

0 comments on commit ce4cddb

Please sign in to comment.