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}"`, )