From ca44aacb01aa2bb51424bdb52e0752d0e1db7e97 Mon Sep 17 00:00:00 2001 From: D-Sketon <2055272094@qq.com> Date: Mon, 4 Sep 2023 21:52:44 +0800 Subject: [PATCH] fix(is_external_link): type (#358) --- 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 6a52663..30e32f1 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 | string[]): boolean { return cache.apply(`${input}-${sitehost}-${exclude}`, () => { // Return false early for internal link if (!/^(\/\/|http(s)?:)/.test(input)) return false;