From 9e9fc14e2bf71f13e659f1d4e066c7f5a4c3ce60 Mon Sep 17 00:00:00 2001 From: Gold John King Date: Mon, 23 Dec 2024 18:24:00 +0800 Subject: [PATCH] optimize as suggested --- src/main/helpers/proxy.helpers.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/helpers/proxy.helpers.ts b/src/main/helpers/proxy.helpers.ts index e870fee4..ea2810b2 100644 --- a/src/main/helpers/proxy.helpers.ts +++ b/src/main/helpers/proxy.helpers.ts @@ -11,7 +11,7 @@ async function isProxyEnabled(): Promise{ 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{