1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
|
Description: fix property accessing error happening with tyepscript 4.9.5
Author: Ananthu C V <weepingclown@disroot.org>
Forwarded: not-needed
Last-Update: 2023-11-19
--- a/src/common/helpers.ts
+++ b/src/common/helpers.ts
@@ -191,7 +191,7 @@
function isValidSocksProxy(proxy: SocksProxy) {
return (
proxy &&
- (typeof proxy.host === 'string' || typeof proxy.ipaddress === 'string') &&
+ (typeof proxy.host === 'string' || typeof (proxy as SocksProxy).ipaddress === 'string') &&
typeof proxy.port === 'number' &&
proxy.port >= 0 &&
proxy.port <= 65535 &&
|