Skip to content

Commit

Permalink
button: fixed external links
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcelCoding committed Apr 5, 2024
1 parent b49be39 commit f6d8704
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions projects/feel/form/src/lib/button/button.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ export class ButtonComponent {
@Input() @HostBinding("class.disabled") public disabled?: boolean | null;

get routerLink(): string | undefined {
return this.link && this.link.startsWith('https:') && this.link.startsWith('mailto:') ? undefined : this.link;
return this.link && (this.link.startsWith('https:') || this.link.startsWith('mailto:')) ? undefined : this.link;
}

get href(): string | undefined {
return this.link && this.link.startsWith('https:') && this.link.startsWith('mailto:') ? this.link : undefined;
return this.link && (this.link.startsWith('https:') || this.link.startsWith('mailto:')) ? this.link : undefined;
}

@HostBinding("class.good")
Expand Down

0 comments on commit f6d8704

Please # to comment.