Skip to content

Commit

Permalink
Fix crash of extension when proxy settings address has wrong format
Browse files Browse the repository at this point in the history
Signed-off-by: azerr <[email protected]>
  • Loading branch information
angelozerr committed Dec 11, 2024
1 parent 0b30585 commit 6875f50
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/settings/proxySettings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export function getProxySettings(): ProxySettings {
return null;
}
const regexResult = HOST_AND_PORT_EXTRACTOR.exec(proxyAddress);
if (!regexResult[1]) {
if (!regexResult || !regexResult[1]) {
return null;
}
const host: string = regexResult[1];
Expand Down

0 comments on commit 6875f50

Please sign in to comment.