From 3072d3af20f028d02474150d24d16bb19e81a98c Mon Sep 17 00:00:00 2001 From: Julien Oculi Date: Thu, 4 Apr 2024 17:11:32 +0200 Subject: [PATCH] fix(cli): error in type assertion --- src/contact.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/contact.ts b/src/contact.ts index 3271341..7fd422b 100644 --- a/src/contact.ts +++ b/src/contact.ts @@ -21,12 +21,12 @@ export class Contact { const { name, address } = custom[shortName as keyof typeof custom] - if (name !== 'string') { + if (typeof name !== 'string') { throw new SyntaxError( `missing key "name" in contact short name config for "${shortName}"`, ) } - if (address !== 'string') { + if (typeof address !== 'string') { throw new SyntaxError( `missing key "address" in contact short name config for "${shortName}"`, )