Skip to content

Commit

Permalink
dont assign onPress handler if noPress is true
Browse files Browse the repository at this point in the history
  • Loading branch information
Doron Tohar committed Feb 14, 2018
1 parent a1dd368 commit 798a0de
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion HyperlinkedText.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export default class HyperlinkedText extends Component {
for (let match of matches) {
const linkDef = match.linkDef;
const style = linkDef.style || this.props.linkStyle;
const onPress = linkDef.noPress? ()=>{} : (linkDef.onPress || this.props.onLinkPress);
const onPress = linkDef.noPress? undefined : (linkDef.onPress || this.props.onLinkPress);
const replaceText = linkDef.replaceText || R.identity;

let nonLinkedText = component.props.children.substring(_lastIndex, match.index);
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-native-hyperlinked-text",
"version": "0.0.7",
"version": "0.0.8",
"keywords": ["react-native", "hyperlink", "hyperlinks", "regex", "links"],
"dependencies": {
"prop-types": "^15.6.0",
Expand Down

0 comments on commit 798a0de

Please sign in to comment.