Skip to content

Commit 6eb2b55

Browse files
committed
Fix type error
1 parent 4a657b5 commit 6eb2b55

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/logger/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const redactedFormat = format((info) => {
1717
info.password = '******';
1818
}
1919

20-
if (typeof info['email'] !== 'undefined') {
20+
if (typeof info['email'] !== 'undefined' && typeof info['email'] === 'string') {
2121
const [ name, domain ] = info.email.split('@');
2222
info.email = `${name.substring(0, 2)}${'*'.repeat(name.length - 2)}@${'*'.repeat(domain.length - 2)}${domain.substring(domain.length - 2)}`;
2323
}

0 commit comments

Comments
 (0)