fix: widen external link rel token set type

This commit is contained in:
Ayaan Zaidi
2026-02-24 22:15:42 +05:30
parent 8892a1cd45
commit 00de3ca833

View File

@@ -4,7 +4,7 @@ export const EXTERNAL_LINK_TARGET = "_blank";
export function buildExternalLinkRel(currentRel?: string): string {
const extraTokens: string[] = [];
const seen = new Set(REQUIRED_EXTERNAL_REL_TOKENS);
const seen = new Set<string>(REQUIRED_EXTERNAL_REL_TOKENS);
for (const rawToken of (currentRel ?? "").split(/\s+/)) {
const token = rawToken.trim().toLowerCase();