Skip to content

Commit

Permalink
optimize as suggested
Browse files Browse the repository at this point in the history
  • Loading branch information
GoldJohnKing committed Dec 23, 2024
1 parent 57b7ee0 commit 9e9fc14
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/helpers/proxy.helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ async function isProxyEnabled(): Promise<boolean>{
if(!key.exists){ throw new Error("Key \"HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings\" not exist"); }
const registryValue = key.values.ProxyEnable as RegDwordValue;
if(!registryValue){ throw new Error("Value \"ProxyEnable\" not exist"); }
return (1 === registryValue.value) ? true : false;
return (1 === registryValue.value);
}

async function getProxyServer(): Promise<string>{
Expand Down

0 comments on commit 9e9fc14

Please sign in to comment.