From 565219ba2f65ea377b20caaf9fb847f587c9857e Mon Sep 17 00:00:00 2001 From: KHeo Date: Tue, 19 Jul 2022 15:35:35 +0900 Subject: [PATCH] feedback --- packages/network/lib/uri.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/network/lib/uri.ts b/packages/network/lib/uri.ts index decdcb42cd3c..392c31b5e0c1 100644 --- a/packages/network/lib/uri.ts +++ b/packages/network/lib/uri.ts @@ -10,12 +10,12 @@ import url, { URL } from 'url' // yup, protocol contains a: ':' colon // at the end of it (-______________-) -const DEFAULT_PROTOCOL_PORTS: Record = { +const DEFAULT_PROTOCOL_PORTS = { 'https:': '443', 'http:': '80', -} +} as const -const DEFAULT_PORTS = _.values(DEFAULT_PROTOCOL_PORTS) +const DEFAULT_PORTS = _.values(DEFAULT_PROTOCOL_PORTS) as string[] const portIsDefault = (port: string | null) => { return port && DEFAULT_PORTS.includes(port)