diff --git a/package.json b/package.json index 607736da40..a561e68d27 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,6 @@ "description": "The world's easiest, most powerful stock checker", "main": "src/index.ts", "scripts": { - "all": "npm run compile && npm run lint && npm run test", "fix": "gts fix", "lint": "gts lint", "clean": "gts clean", diff --git a/src/config.ts b/src/config.ts index c2c187312b..7dd285a488 100644 --- a/src/config.ts +++ b/src/config.ts @@ -158,7 +158,7 @@ function envOrNumberMax( return number ?? 0; } -function loadProxyList(filename: string): string[] { +function loadProxyList(filename: string): string[] | undefined { try { return readFileSync(`${filename}.proxies`) .toString() @@ -166,7 +166,7 @@ function loadProxyList(filename: string): string[] { .split('\n') .map(x => x.trim()); } catch { - return []; + return undefined; } } @@ -412,7 +412,7 @@ const store = { let proxyList = loadProxyList(name); - if (proxyList.length === 0) { + if (!proxyList) { proxyList = loadProxyList('global'); } diff --git a/src/web/index.ts b/src/web/index.ts index af07f91db1..69078e08e5 100644 --- a/src/web/index.ts +++ b/src/web/index.ts @@ -11,7 +11,7 @@ import { import {isAbsolute, join, normalize, relative} from 'path'; import {logger} from '../logger'; -const approot = join(__dirname, '../../../'); +const approot = join(__dirname, '../../'); const webroot = join(approot, './web'); const contentTypeMap: Record = {