Skip to content

Commit 57df266

Browse files
committed
Fix: proper support of mailto: in Link and NavLink
Fixes topcoder-platform#27
1 parent 3f6056b commit 57df266

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/shared/components/GenericLink.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export default function GenericLink(props) {
3030
* - It should be opened in a new tab;
3131
* - It is an absolte URL (starts with http:// or https://);
3232
* - It is anchor link (starts with #). */
33-
if (enforceA || openNewTab || to.match(/^(#|https?:\/\/)/)) {
33+
if (enforceA || openNewTab || to.match(/^(#|(https?|mailto):\/\/)/)) {
3434
return (
3535
<a
3636
className={className}

0 commit comments

Comments
 (0)