Skip to content

Commit

Permalink
if target is _self act as target is falsy (#6138)
Browse files Browse the repository at this point in the history
  • Loading branch information
ericyang89 authored and mjackson committed Oct 15, 2018
1 parent 48711a0 commit 079ebd3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/react-router-dom/modules/Link.js
Expand Up @@ -22,7 +22,7 @@ class Link extends React.Component {
if (
!event.defaultPrevented && // onClick prevented default
event.button === 0 && // ignore everything but left clicks
!this.props.target && // let browser handle "target=_blank" etc.
(!this.props.target || this.props.target === "_self") && // let browser handle "target=_blank" etc.
!isModifiedEvent(event) // ignore clicks with modifier keys
) {
event.preventDefault();
Expand Down

0 comments on commit 079ebd3

Please sign in to comment.