Skip to content

Commit

Permalink
collapsed conditional
Browse files Browse the repository at this point in the history
  • Loading branch information
inugmanov committed Sep 10, 2018
1 parent c84e146 commit b7fb321
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 b7fb321

Please sign in to comment.