Skip to content

Commit

Permalink
fix: correcting type annotation
Browse files Browse the repository at this point in the history
  • Loading branch information
liby committed Aug 19, 2023
1 parent f53c77d commit c9e6649
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/is_external_link.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const cache = new Cache<boolean>();
* @returns {Boolean} True if the link doesn't have protocol or link has same host with config.url
*/

function isExternalLink(input: string, sitehost: string, exclude: string[]): boolean {
function isExternalLink(input: string, sitehost: string, exclude?: string[]): boolean {
return cache.apply(`${input}-${sitehost}-${exclude}`, () => {
// Return false early for internal link
if (!/^(\/\/|http(s)?:)/.test(input)) return false;
Expand Down

0 comments on commit c9e6649

Please sign in to comment.