Skip to content

Commit

Permalink
#43252 Disable extra links button if link is null or empty (#43844) (#…
Browse files Browse the repository at this point in the history
…43851)

* Disable button if link is null or empty

* Fix space

---------

Co-authored-by: Enis Nazif <[email protected]>
(cherry picked from commit de88182)

Co-authored-by: enisnazif <[email protected]>
  • Loading branch information
2 people authored and utkarsharma2 committed Dec 9, 2024
1 parent b7ae656 commit 7e1989a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ const ExtraLinks = ({

const isSanitised = (url: string | null) => {
if (!url) {
return true;
return false; // Empty or null urls should cause the link to be disabled
}
const urlRegex = /^(https?:)/i;
return urlRegex.test(url);
Expand Down

0 comments on commit 7e1989a

Please sign in to comment.