Skip to content

Commit

Permalink
Merge pull request #16961 from IzzatN/change-if
Browse files Browse the repository at this point in the history
collapsed conditional
  • Loading branch information
locks authored Sep 11, 2018
2 parents 8d84560 + b7fb321 commit 615daa2
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions packages/@ember/-internals/glimmer/lib/components/link-to.ts
Original file line number Diff line number Diff line change
Expand Up @@ -641,10 +641,8 @@ const LinkComponent = EmberComponent.extend({
let preventDefault = get(this, 'preventDefault');
let targetAttribute = get(this, 'target');

if (preventDefault !== false) {
if (!targetAttribute || targetAttribute === '_self') {
event.preventDefault();
}
if (preventDefault !== false && (!targetAttribute || targetAttribute === '_self')) {
event.preventDefault();
}

if (get(this, 'bubbles') === false) {
Expand Down

0 comments on commit 615daa2

Please sign in to comment.