mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-23 18:19:12 +01:00
Apply suggestion from @Copilot
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -106,7 +106,12 @@ function getLocationFragmentFromLinkText(linkText: string): string | undefined {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
const fragment = decodeURIComponent(linkText.slice(fragmentStart + 1));
|
||||
let fragment: string;
|
||||
try {
|
||||
fragment = decodeURIComponent(linkText.slice(fragmentStart + 1));
|
||||
} catch {
|
||||
return undefined;
|
||||
}
|
||||
if (!fragment) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user