optimize as suggested

This commit is contained in:
Gold John King
2024-12-23 18:24:00 +08:00
parent 57b7ee00a1
commit 9e9fc14e2b
+1 -1
View File
@@ -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>{