From 7dda4e5bf3f8391e3837d169d2164ab125d011cf Mon Sep 17 00:00:00 2001 From: Bryan Lee <38807139+liby@users.noreply.github.com> Date: Tue, 22 Aug 2023 15:36:46 +0800 Subject: [PATCH] fix(is_external_link): correcting type annotation (#347) --- lib/is_external_link.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/is_external_link.ts b/lib/is_external_link.ts index e3903dc9..6a526634 100644 --- a/lib/is_external_link.ts +++ b/lib/is_external_link.ts @@ -10,7 +10,7 @@ const cache = new Cache(); * @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;