From 518cd21fd649026595b1b9201da03ccb0b998330 Mon Sep 17 00:00:00 2001 From: fmtabbara Date: Wed, 4 Aug 2021 12:42:25 +0100 Subject: [PATCH] type function parameter --- wallet-web/components/bond/utils.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/wallet-web/components/bond/utils.ts b/wallet-web/components/bond/utils.ts index 3d3c337582..e232328854 100644 --- a/wallet-web/components/bond/utils.ts +++ b/wallet-web/components/bond/utils.ts @@ -30,9 +30,7 @@ export const validateKey = (key: string): boolean => { } } -export const isValidHostname = (value) => { - if (typeof value !== 'string') return false - +export const isValidHostname = (value: string) => { const validHostnameChars = /^[a-zA-Z0-9-.]{1,253}\.?$/g if (!validHostnameChars.test(value)) { return false